From: jenkins-bot Date: Mon, 8 Aug 2016 16:30:59 +0000 (+0000) Subject: Merge "Adding a bunch of hooks from wikiHow into DifferenceEngine, 2nd try" X-Git-Tag: 1.31.0-rc.0~6131 X-Git-Url: http://git.cyclocoop.org//%22http:/%22.attribut_html%28%24lesurls%5B%24numero%5D%29.%22/%22?a=commitdiff_plain;h=3e9d53bfadb9f277ba488422479c28d3444a99fd;hp=03dfe2c3be0f904061bf9bbd30122bfe599fd38f;p=lhc%2Fweb%2Fwiklou.git Merge "Adding a bunch of hooks from wikiHow into DifferenceEngine, 2nd try" --- diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 697665552c..f26f24052c 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -6,6 +6,9 @@ MediaWiki 1.28 is an alpha-quality branch and is not recommended for use in production. === Configuration changes in 1.28 === +* BREAKING CHANGE: $wgHTTPProxy is now *required* for all external requests + made by MediaWiki via a proxy. Relying on the http_proxy environment + variable is no longer supported. * The load.php entry point now enforces the existing policy of not allowing access to session data, which includes the session user and the session user's language. If such access is attempted, an exception will be thrown. @@ -16,16 +19,28 @@ production. * $wgForeignUploadTargets now defaults to `[ 'local' ]`, where `'local'` signifies local uploads. A value of `[]` (empty array) now means that no upload targets are allowed, effectively disabling the upload dialog. +* The deprecated $wgEditEncoding variable has been removed; it was only used + for Esperanto language character conversion. You are now recommended to use + input methods provided by the UniversalLanguageSelector extension. +* When $wgPingback is true, MediaWiki will periodically ping + https://www.mediawiki.org/beacon with basic information about the local + MediaWiki installation. This data includes, for example, the type of system, + PHP version, and chosen database backend. This behavior is off by default. === New features in 1.28 === * User::isBot() method for checking if an account is a bot role account. -* Added a new 'slider' mode for galleries. +* Added a new 'slideshow' mode for galleries. * Added a new hook, 'UserIsBot', to aid in determining if a user is a bot. * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better interact with API parsing. * Added a new hook, 'UploadVerifyUpload', which can be used to reject a file upload. Unlike 'UploadVerifyFile' it provides information about upload comment and the file description page, but does not run for uploads to stash. +* (T141604) Extensions can now provide a better error message when their + maintenance scripts are run without the extension being installed. +* (T8948) Numeric sorting in categories is now supported by setting $wgCategoryCollation + to uca-default-u-kn or uca--u-kn. If migrating from another + collation, you will need to run the updateCollation.php maintenance script. === External library changes in 1.28 === @@ -39,6 +54,13 @@ production. === Bug fixes in 1.28 === === Action API changes in 1.28 === +* Added 'maxarticlesize' property to action=query&meta=siteinfo which contains + the value of $wgMaxArticleSize. +* Property 'modulemessages' from action=parse&prop=modules was removed + (deprecated since 1.26). +* The following response properties from action=login, deprecated in 1.27, are + now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies + to properly manage session state. === Action API internal changes in 1.28 === * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better @@ -52,6 +74,8 @@ changes to languages because of Phabricator reports. * (T137411) ban (Balinese), thanks to translators Adi Mayndra, Andru, BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라. +* (T135867) shn (Shan), thanks to translators Khun Sar, Piangpha, + Saiddzone Saimawnkham, Saosukham, and Sengwan. === Other changes in 1.28 === * (T128697) Improved handling of large diffs. @@ -59,6 +83,28 @@ changes to languages because of Phabricator reports. use or update a custom session provider if needed. * Deprecated APIEditBeforeSave hook in favor of EditFilterMergedContent. * The 'UploadVerification' hook is deprecated. Use 'UploadVerifyFile' instead. +* SiteConfiguration::isLocalVHost() was removed (deprecated since 1.25). +* The 'UserLoginComplete' hook has a new parameter to differentiate between actual + login and visiting the login page while already logged in. +* ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24). +* $.fn.liveAndTestAtStart was removed (deprecated since 1.24). +* Linker::link() and Linker::linkKnown() were deprecated; please instead use + MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks + were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd + respectively. See docs/hooks.txt for the specific changes needed for those hooks. +* Aliases for Linker methods, deprecated since 1.21, were removed from Skin: + * Skin::commentBlock() (use Linker::commentBlock() instead) + * Skin::generateRollback() (use Linker::generateRollback() instead) + * Skin::link() (use MediaWiki\Linker\LinkRenderer instead) + * Skin::linkKnown() (use MediaWiki\Linker\LinkRenderer instead) + * Skin::userLink() (use Linker::userLink() instead) + * Skin::userToolLinks() (use Linker::userToolLinks() instead) +* The 'ParserLimitReportFormat' hook was removed. +* Disabled "bug 2702" HTML tidying of parsed UI messages on wikis where Tidy is + disabled. +* DifferenceEngine::generateDiffBody() was removed (deprecated since 1.21). +* UploadBase::stashFileGetKey() and UploadBase::stashSession() were deprecated. + Use ...->stashFile()->getFileKey() instead. == Compatibility == diff --git a/UPGRADE b/UPGRADE index 088701a3eb..0fff28962c 100644 --- a/UPGRADE +++ b/UPGRADE @@ -1,18 +1,17 @@ - This file provides an overview of the MediaWiki upgrade process. For help with specific problems, check -* the documentation at https://www.mediawiki.org +* the documentation at https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents/ * the mediawiki-l mailing list archive at http://lists.wikimedia.org/pipermail/mediawiki-l/ -* the bug tracker at https://phabricator.wikimedia.org +* the bug tracker at https://phabricator.wikimedia.org/ for information and workarounds to common issues. == Overview == Comprehensive documentation on upgrading to the latest version of the software -is available at https://www.mediawiki.org/wiki/Manual:Upgrading. +is available at https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading === Consult the release notes === @@ -28,7 +27,7 @@ you take a complete backup of your wiki database and files and verify it. While the upgrade scripts are somewhat robust, there is no guarantee that things will not fail, leaving the database in an inconsistent state. -https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki provides an overview of +https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki provides an overview of the backup process. You should also refer to the documentation for your database management system for information on backing up a database, and to your operating system documentation for information on making copies of files. diff --git a/autoload.php b/autoload.php index 8e214ce210..29f986e3eb 100644 --- a/autoload.php +++ b/autoload.php @@ -21,6 +21,7 @@ $wgAutoloadLocalClasses = [ 'ApiAuthManagerHelper' => __DIR__ . '/includes/api/ApiAuthManagerHelper.php', 'ApiBase' => __DIR__ . '/includes/api/ApiBase.php', 'ApiBlock' => __DIR__ . '/includes/api/ApiBlock.php', + 'ApiCSPReport' => __DIR__ . '/includes/api/ApiCSPReport.php', 'ApiChangeAuthenticationData' => __DIR__ . '/includes/api/ApiChangeAuthenticationData.php', 'ApiCheckToken' => __DIR__ . '/includes/api/ApiCheckToken.php', 'ApiClearHasMsg' => __DIR__ . '/includes/api/ApiClearHasMsg.php', @@ -28,7 +29,6 @@ $wgAutoloadLocalClasses = [ 'ApiComparePages' => __DIR__ . '/includes/api/ApiComparePages.php', 'ApiContinuationManager' => __DIR__ . '/includes/api/ApiContinuationManager.php', 'ApiCreateAccount' => __DIR__ . '/includes/api/ApiCreateAccount.php', - 'ApiCSPReport' => __DIR__ . '/includes/api/ApiCSPReport.php', 'ApiDelete' => __DIR__ . '/includes/api/ApiDelete.php', 'ApiDisabled' => __DIR__ . '/includes/api/ApiDisabled.php', 'ApiEditPage' => __DIR__ . '/includes/api/ApiEditPage.php', @@ -157,6 +157,7 @@ $wgAutoloadLocalClasses = [ 'AuthManagerSpecialPage' => __DIR__ . '/includes/specialpage/AuthManagerSpecialPage.php', 'AuthPlugin' => __DIR__ . '/includes/AuthPlugin.php', 'AuthPluginUser' => __DIR__ . '/includes/AuthPlugin.php', + 'AutoCommitUpdate' => __DIR__ . '/includes/deferred/AutoCommitUpdate.php', 'AutoLoader' => __DIR__ . '/includes/AutoLoader.php', 'AutoloadGenerator' => __DIR__ . '/includes/utils/AutoloadGenerator.php', 'Autopromote' => __DIR__ . '/includes/Autopromote.php', @@ -245,6 +246,7 @@ $wgAutoloadLocalClasses = [ 'ClassCollector' => __DIR__ . '/includes/utils/AutoloadGenerator.php', 'CleanupAncientTables' => __DIR__ . '/maintenance/cleanupAncientTables.php', 'CleanupBlocks' => __DIR__ . '/maintenance/cleanupBlocks.php', + 'CleanupEmptyCategories' => __DIR__ . '/maintenance/cleanupEmptyCategories.php', 'CleanupPreferences' => __DIR__ . '/maintenance/cleanupPreferences.php', 'CleanupRemovedModules' => __DIR__ . '/maintenance/cleanupRemovedModules.php', 'CleanupSpam' => __DIR__ . '/maintenance/cleanupSpam.php', @@ -328,6 +330,7 @@ $wgAutoloadLocalClasses = [ 'DateFormats' => __DIR__ . '/maintenance/language/date-formats.php', 'DateFormatter' => __DIR__ . '/includes/parser/DateFormatter.php', 'DeadendPagesPage' => __DIR__ . '/includes/specials/SpecialDeadendpages.php', + 'DeferrableCallback' => __DIR__ . '/includes/deferred/DeferrableCallback.php', 'DeferrableUpdate' => __DIR__ . '/includes/deferred/DeferrableUpdate.php', 'DeferredStringifier' => __DIR__ . '/includes/libs/DeferredStringifier.php', 'DeferredUpdates' => __DIR__ . '/includes/deferred/DeferredUpdates.php', @@ -389,6 +392,7 @@ $wgAutoloadLocalClasses = [ 'DumpPipeOutput' => __DIR__ . '/includes/export/DumpPipeOutput.php', 'DumpRenderer' => __DIR__ . '/maintenance/renderDump.php', 'DumpRev' => __DIR__ . '/maintenance/storage/dumpRev.php', + 'DumpStringOutput' => __DIR__ . '/includes/export/DumpStringOutput.php', 'DuplicateJob' => __DIR__ . '/includes/jobqueue/jobs/DuplicateJob.php', 'EditAction' => __DIR__ . '/includes/actions/EditAction.php', 'EditCLI' => __DIR__ . '/maintenance/edit.php', @@ -510,41 +514,41 @@ $wgAutoloadLocalClasses = [ 'GitInfo' => __DIR__ . '/includes/GitInfo.php', 'GlobalDependency' => __DIR__ . '/includes/cache/CacheDependency.php', 'GlobalVarConfig' => __DIR__ . '/includes/config/GlobalVarConfig.php', - 'HTMLApiField' => __DIR__ . '/includes/htmlform/HTMLApiField.php', - 'HTMLAutoCompleteSelectField' => __DIR__ . '/includes/htmlform/HTMLAutoCompleteSelectField.php', - 'HTMLButtonField' => __DIR__ . '/includes/htmlform/HTMLButtonField.php', + 'HTMLApiField' => __DIR__ . '/includes/htmlform/fields/HTMLApiField.php', + 'HTMLAutoCompleteSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLAutoCompleteSelectField.php', + 'HTMLButtonField' => __DIR__ . '/includes/htmlform/fields/HTMLButtonField.php', 'HTMLCacheUpdate' => __DIR__ . '/includes/deferred/HTMLCacheUpdate.php', 'HTMLCacheUpdateJob' => __DIR__ . '/includes/jobqueue/jobs/HTMLCacheUpdateJob.php', - 'HTMLCheckField' => __DIR__ . '/includes/htmlform/HTMLCheckField.php', - 'HTMLCheckMatrix' => __DIR__ . '/includes/htmlform/HTMLCheckMatrix.php', - 'HTMLComboboxField' => __DIR__ . '/includes/htmlform/HTMLComboboxField.php', - 'HTMLEditTools' => __DIR__ . '/includes/htmlform/HTMLEditTools.php', + 'HTMLCheckField' => __DIR__ . '/includes/htmlform/fields/HTMLCheckField.php', + 'HTMLCheckMatrix' => __DIR__ . '/includes/htmlform/fields/HTMLCheckMatrix.php', + 'HTMLComboboxField' => __DIR__ . '/includes/htmlform/fields/HTMLComboboxField.php', + 'HTMLEditTools' => __DIR__ . '/includes/htmlform/fields/HTMLEditTools.php', 'HTMLFileCache' => __DIR__ . '/includes/cache/HTMLFileCache.php', - 'HTMLFloatField' => __DIR__ . '/includes/htmlform/HTMLFloatField.php', + 'HTMLFloatField' => __DIR__ . '/includes/htmlform/fields/HTMLFloatField.php', 'HTMLForm' => __DIR__ . '/includes/htmlform/HTMLForm.php', 'HTMLFormField' => __DIR__ . '/includes/htmlform/HTMLFormField.php', - 'HTMLFormFieldCloner' => __DIR__ . '/includes/htmlform/HTMLFormFieldCloner.php', + 'HTMLFormFieldCloner' => __DIR__ . '/includes/htmlform/fields/HTMLFormFieldCloner.php', 'HTMLFormFieldRequiredOptionsException' => __DIR__ . '/includes/htmlform/HTMLFormFieldRequiredOptionsException.php', - 'HTMLFormFieldWithButton' => __DIR__ . '/includes/htmlform/HTMLFormFieldWithButton.php', - 'HTMLHiddenField' => __DIR__ . '/includes/htmlform/HTMLHiddenField.php', - 'HTMLInfoField' => __DIR__ . '/includes/htmlform/HTMLInfoField.php', - 'HTMLIntField' => __DIR__ . '/includes/htmlform/HTMLIntField.php', - 'HTMLMultiSelectField' => __DIR__ . '/includes/htmlform/HTMLMultiSelectField.php', + 'HTMLFormFieldWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLFormFieldWithButton.php', + 'HTMLHiddenField' => __DIR__ . '/includes/htmlform/fields/HTMLHiddenField.php', + 'HTMLInfoField' => __DIR__ . '/includes/htmlform/fields/HTMLInfoField.php', + 'HTMLIntField' => __DIR__ . '/includes/htmlform/fields/HTMLIntField.php', + 'HTMLMultiSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLMultiSelectField.php', 'HTMLNestedFilterable' => __DIR__ . '/includes/htmlform/HTMLNestedFilterable.php', - 'HTMLRadioField' => __DIR__ . '/includes/htmlform/HTMLRadioField.php', - 'HTMLSelectAndOtherField' => __DIR__ . '/includes/htmlform/HTMLSelectAndOtherField.php', - 'HTMLSelectField' => __DIR__ . '/includes/htmlform/HTMLSelectField.php', - 'HTMLSelectLimitField' => __DIR__ . '/includes/htmlform/HTMLSelectLimitField.php', - 'HTMLSelectNamespace' => __DIR__ . '/includes/htmlform/HTMLSelectNamespace.php', - 'HTMLSelectNamespaceWithButton' => __DIR__ . '/includes/htmlform/HTMLSelectNamespaceWithButton.php', - 'HTMLSelectOrOtherField' => __DIR__ . '/includes/htmlform/HTMLSelectOrOtherField.php', - 'HTMLSubmitField' => __DIR__ . '/includes/htmlform/HTMLSubmitField.php', - 'HTMLTagFilter' => __DIR__ . '/includes/htmlform/HTMLTagFilter.php', - 'HTMLTextAreaField' => __DIR__ . '/includes/htmlform/HTMLTextAreaField.php', - 'HTMLTextField' => __DIR__ . '/includes/htmlform/HTMLTextField.php', - 'HTMLTextFieldWithButton' => __DIR__ . '/includes/htmlform/HTMLTextFieldWithButton.php', - 'HTMLTitleTextField' => __DIR__ . '/includes/htmlform/HTMLTitleTextField.php', - 'HTMLUserTextField' => __DIR__ . '/includes/htmlform/HTMLUserTextField.php', + 'HTMLRadioField' => __DIR__ . '/includes/htmlform/fields/HTMLRadioField.php', + 'HTMLSelectAndOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectAndOtherField.php', + 'HTMLSelectField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectField.php', + 'HTMLSelectLimitField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectLimitField.php', + 'HTMLSelectNamespace' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespace.php', + 'HTMLSelectNamespaceWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLSelectNamespaceWithButton.php', + 'HTMLSelectOrOtherField' => __DIR__ . '/includes/htmlform/fields/HTMLSelectOrOtherField.php', + 'HTMLSubmitField' => __DIR__ . '/includes/htmlform/fields/HTMLSubmitField.php', + 'HTMLTagFilter' => __DIR__ . '/includes/htmlform/fields/HTMLTagFilter.php', + 'HTMLTextAreaField' => __DIR__ . '/includes/htmlform/fields/HTMLTextAreaField.php', + 'HTMLTextField' => __DIR__ . '/includes/htmlform/fields/HTMLTextField.php', + 'HTMLTextFieldWithButton' => __DIR__ . '/includes/htmlform/fields/HTMLTextFieldWithButton.php', + 'HTMLTitleTextField' => __DIR__ . '/includes/htmlform/fields/HTMLTitleTextField.php', + 'HTMLUserTextField' => __DIR__ . '/includes/htmlform/fields/HTMLUserTextField.php', 'HWLDFWordAccumulator' => __DIR__ . '/includes/diff/DairikiDiff.php', 'HashBagOStuff' => __DIR__ . '/includes/libs/objectcache/HashBagOStuff.php', 'HashConfig' => __DIR__ . '/includes/config/HashConfig.php', @@ -663,7 +667,6 @@ $wgAutoloadLocalClasses = [ 'LanguageConverter' => __DIR__ . '/languages/LanguageConverter.php', 'LanguageCu' => __DIR__ . '/languages/classes/LanguageCu.php', 'LanguageDsb' => __DIR__ . '/languages/classes/LanguageDsb.php', - 'LanguageEo' => __DIR__ . '/languages/classes/LanguageEo.php', 'LanguageEs' => __DIR__ . '/languages/classes/LanguageEs.php', 'LanguageEt' => __DIR__ . '/languages/classes/LanguageEt.php', 'LanguageFi' => __DIR__ . '/languages/classes/LanguageFi.php', @@ -752,7 +755,7 @@ $wgAutoloadLocalClasses = [ 'LonelyPagesPage' => __DIR__ . '/includes/specials/SpecialLonelypages.php', 'LongPagesPage' => __DIR__ . '/includes/specials/SpecialLongpages.php', 'MIMEsearchPage' => __DIR__ . '/includes/specials/SpecialMIMEsearch.php', - 'MWCallableUpdate' => __DIR__ . '/includes/deferred/CallableUpdate.php', + 'MWCallableUpdate' => __DIR__ . '/includes/deferred/MWCallableUpdate.php', 'MWContentSerializationException' => __DIR__ . '/includes/content/ContentHandler.php', 'MWCryptHKDF' => __DIR__ . '/includes/utils/MWCryptHKDF.php', 'MWCryptHash' => __DIR__ . '/includes/utils/MWCryptHash.php', @@ -787,6 +790,7 @@ $wgAutoloadLocalClasses = [ 'MarkpatrolledAction' => __DIR__ . '/includes/actions/MarkpatrolledAction.php', 'McTest' => __DIR__ . '/maintenance/mctest.php', 'MediaHandler' => __DIR__ . '/includes/media/MediaHandler.php', + 'MediaHandlerFactory' => __DIR__ . '/includes/media/MediaHandlerFactory.php', 'MediaStatisticsPage' => __DIR__ . '/includes/specials/SpecialMediaStatistics.php', 'MediaTransformError' => __DIR__ . '/includes/media/MediaTransformOutput.php', 'MediaTransformInvalidParametersException' => __DIR__ . '/includes/media/MediaTransformInvalidParametersException.php', @@ -879,7 +883,14 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\Session\\Token' => __DIR__ . '/includes/session/Token.php', 'MediaWiki\\Session\\UserInfo' => __DIR__ . '/includes/session/UserInfo.php', 'MediaWiki\\Site\\MediaWikiPageNameNormalizer' => __DIR__ . '/includes/site/MediaWikiPageNameNormalizer.php', + 'MediaWiki\\Tidy\\BalanceActiveFormattingElements' => __DIR__ . '/includes/tidy/Balancer.php', + 'MediaWiki\\Tidy\\BalanceElement' => __DIR__ . '/includes/tidy/Balancer.php', + 'MediaWiki\\Tidy\\BalanceMarker' => __DIR__ . '/includes/tidy/Balancer.php', + 'MediaWiki\\Tidy\\BalanceSets' => __DIR__ . '/includes/tidy/Balancer.php', + 'MediaWiki\\Tidy\\BalanceStack' => __DIR__ . '/includes/tidy/Balancer.php', + 'MediaWiki\\Tidy\\Balancer' => __DIR__ . '/includes/tidy/Balancer.php', 'MediaWiki\\Tidy\\Html5Depurate' => __DIR__ . '/includes/tidy/Html5Depurate.php', + 'MediaWiki\\Tidy\\Html5Internal' => __DIR__ . '/includes/tidy/Html5Internal.php', 'MediaWiki\\Tidy\\RaggettBase' => __DIR__ . '/includes/tidy/RaggettBase.php', 'MediaWiki\\Tidy\\RaggettExternal' => __DIR__ . '/includes/tidy/RaggettExternal.php', 'MediaWiki\\Tidy\\RaggettInternalHHVM' => __DIR__ . '/includes/tidy/RaggettInternalHHVM.php', @@ -978,7 +989,6 @@ $wgAutoloadLocalClasses = [ 'PNGMetadataExtractor' => __DIR__ . '/includes/media/PNGMetadataExtractor.php', 'PPCustomFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php', 'PPCustomFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php', - 'PPDAccum_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php', 'PPDPart' => __DIR__ . '/includes/parser/Preprocessor_DOM.php', 'PPDPart_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php', 'PPDStack' => __DIR__ . '/includes/parser/Preprocessor_DOM.php', @@ -1030,6 +1040,7 @@ $wgAutoloadLocalClasses = [ 'PermissionsError' => __DIR__ . '/includes/exception/PermissionsError.php', 'PhpHttpRequest' => __DIR__ . '/includes/HttpFunctions.php', 'PhpXmlBugTester' => __DIR__ . '/includes/installer/PhpBugTests.php', + 'Pingback' => __DIR__ . '/includes/Pingback.php', 'PoolCounter' => __DIR__ . '/includes/poolcounter/PoolCounter.php', 'PoolCounterRedis' => __DIR__ . '/includes/poolcounter/PoolCounterRedis.php', 'PoolCounterWork' => __DIR__ . '/includes/poolcounter/PoolCounterWork.php', @@ -1159,6 +1170,7 @@ $wgAutoloadLocalClasses = [ 'ResourceLoaderUserDefaultsModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserDefaultsModule.php', 'ResourceLoaderUserModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserModule.php', 'ResourceLoaderUserOptionsModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserOptionsModule.php', + 'ResourceLoaderUserStylesModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserStylesModule.php', 'ResourceLoaderUserTokensModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserTokensModule.php', 'ResourceLoaderWikiModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderWikiModule.php', 'RestbaseVirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/RestbaseVirtualRESTService.php', @@ -1176,6 +1188,7 @@ $wgAutoloadLocalClasses = [ 'RevDelLogList' => __DIR__ . '/includes/revisiondelete/RevDelLogList.php', 'RevDelRevisionItem' => __DIR__ . '/includes/revisiondelete/RevDelRevisionItem.php', 'RevDelRevisionList' => __DIR__ . '/includes/revisiondelete/RevDelRevisionList.php', + 'ReverseArrayIterator' => __DIR__ . '/includes/libs/ReverseArrayIterator.php', 'ReverseChronologicalPager' => __DIR__ . '/includes/pager/ReverseChronologicalPager.php', 'RevertAction' => __DIR__ . '/includes/actions/RevertAction.php', 'Revision' => __DIR__ . '/includes/Revision.php', @@ -1251,7 +1264,7 @@ $wgAutoloadLocalClasses = [ 'SkinFallback' => __DIR__ . '/includes/skins/SkinFallback.php', 'SkinFallbackTemplate' => __DIR__ . '/includes/skins/SkinFallbackTemplate.php', 'SkinTemplate' => __DIR__ . '/includes/skins/SkinTemplate.php', - 'SliderImageGallery' => __DIR__ . '/includes/gallery/SliderImageGallery.php', + 'SlideshowImageGallery' => __DIR__ . '/includes/gallery/SlideshowImageGallery.php', 'SpecialActiveUsers' => __DIR__ . '/includes/specials/SpecialActiveusers.php', 'SpecialAllMessages' => __DIR__ . '/includes/specials/SpecialAllMessages.php', 'SpecialAllMyUploads' => __DIR__ . '/includes/specials/SpecialMyRedirectPages.php', @@ -1430,6 +1443,7 @@ $wgAutoloadLocalClasses = [ 'UpdateArticleCount' => __DIR__ . '/maintenance/updateArticleCount.php', 'UpdateCollation' => __DIR__ . '/maintenance/updateCollation.php', 'UpdateDoubleWidthSearch' => __DIR__ . '/maintenance/updateDoubleWidthSearch.php', + 'UpdateExtensionJsonSchema' => __DIR__ . '/maintenance/updateExtensionJsonSchema.php', 'UpdateLogging' => __DIR__ . '/maintenance/archives/upgradeLogging.php', 'UpdateMediaWiki' => __DIR__ . '/maintenance/update.php', 'UpdateRestrictions' => __DIR__ . '/maintenance/updateRestrictions.php', @@ -1527,6 +1541,7 @@ $wgAutoloadLocalClasses = [ 'WikiReference' => __DIR__ . '/includes/WikiMap.php', 'WikiRevision' => __DIR__ . '/includes/import/WikiRevision.php', 'WikiStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php', + 'WikiTextStructure' => __DIR__ . '/includes/content/WikiTextStructure.php', 'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php', 'WikitextContentHandler' => __DIR__ . '/includes/content/WikitextContentHandler.php', 'WinCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/WinCacheBagOStuff.php', diff --git a/composer.json b/composer.json index 04a5e85a22..9bd0fa1f07 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "wiki": "https://www.mediawiki.org/" }, "require": { - "composer/semver": "1.4.0", + "composer/semver": "1.4.1", "cssjanus/cssjanus": "1.1.2", "ext-ctype": "*", "ext-iconv": "*", @@ -25,7 +25,7 @@ "ext-xml": "*", "liuggio/statsd-php-client": "1.0.18", "mediawiki/at-ease": "1.1.0", - "oojs/oojs-ui": "0.17.5", + "oojs/oojs-ui": "0.17.7", "oyejorge/less.php": "1.7.0.10", "php": ">=5.5.9", "psr/log": "1.0.0", @@ -40,12 +40,12 @@ "wikimedia/relpath": "1.0.3", "wikimedia/running-stat": "1.1.0", "wikimedia/utfnormal": "1.0.3", - "wikimedia/wrappedstring": "2.1.1", + "wikimedia/wrappedstring": "2.2.0", "zordius/lightncandy": "0.23" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "justinrainbow/json-schema": "~1.3", + "justinrainbow/json-schema": "~1.6", "mediawiki/mediawiki-codesniffer": "0.7.2", "monolog/monolog": "~1.18.2", "nikic/php-parser": "1.4.1", diff --git a/docs/README b/docs/README index 5bc8bfc665..6f3da973d6 100644 --- a/docs/README +++ b/docs/README @@ -5,7 +5,7 @@ The 'docs' directory contain various text files that should help you understand the most important parts of the code of MediaWiki. More in-depth documentation can be found at: https://www.mediawiki.org/wiki/Manual:Code - + https://www.mediawiki.org/wiki/Developer_hub API documentation is automatically generated and updated daily at: https://doc.wikimedia.org/mediawiki-core/master/php/html/ diff --git a/docs/distributors.txt b/docs/distributors.txt index efa573db14..f19574c06c 100644 --- a/docs/distributors.txt +++ b/docs/distributors.txt @@ -1,23 +1,23 @@ This document is intended to provide useful advice for parties seeking to -redistribute MediaWiki to end users. It's targeted particularly at maintainers +redistribute MediaWiki to end users. It's targeted particularly at maintainers for Linux distributions, since it's been observed that distribution packages of -MediaWiki often break. We've consistently had to recommend that users seeking +MediaWiki often break. We've consistently had to recommend that users seeking support use official tarballs instead of their distribution's packages, and -this often solves whatever problem the user is having. It would be nice if +this often solves whatever problem the user is having. It would be nice if this could change. == Background: why web applications are different == MediaWiki is intended to be usable on any web host that provides support for -PHP and a database. Many users of low-end shared hosting have very limited +PHP and a database. Many users of low-end shared hosting have very limited access to their machine: often only FTP access to some subdirectory of the web -root. Support for these users entails several restrictions, such as: +root. Support for these users entails several restrictions, such as: - 1) We cannot require installation of any files outside the web root. Few of + 1) We cannot require installation of any files outside the web root. Few of our users have access to directories like /usr or /etc. 2) We cannot require the ability to run any utility on the command line. Many shared hosts have exec() and similar PHP functions disabled. - 3) We cannot assume that the software has write access anywhere useful. The + 3) We cannot assume that the software has write access anywhere useful. The user account that MediaWiki (including its installer) runs under is often different from the account the user used to upload the files, and we might be restricted by PHP settings such as safe mode or open_basedir. @@ -30,28 +30,28 @@ root. Support for these users entails several restrictions, such as: Since anything that works on cheap shared hosting will work if you have shell or root access too, MediaWiki's design is based around catering to the lowest -common denominator. Although we support higher-end setups as well (like +common denominator. Although we support higher-end setups as well (like Wikipedia!), the way many things work by default is tailored toward shared -hosting. These defaults are unconventional from the point of view of normal +hosting. These defaults are unconventional from the point of view of normal (non-web) applications -- they might conflict with distributors' policies, and they certainly aren't ideal for someone who's installing MediaWiki as root. == Directory structure == Because of constraint (1) above, MediaWiki does not conform to normal -Unix filesystem layout. Hopefully we'll offer direct support for standard +Unix filesystem layout. Hopefully we'll offer direct support for standard layouts in the future, but for now *any change to the location of files is -unsupported*. Moving things and leaving symlinks will *probably* not break +unsupported*. Moving things and leaving symlinks will *probably* not break anything, but it is *strongly* advised not to try any more intrusive changes to -get MediaWiki to conform more closely to your filesystem hierarchy. Any such +get MediaWiki to conform more closely to your filesystem hierarchy. Any such attempt will almost certainly result in unnecessary bugs. The standard recommended location to install MediaWiki, relative to the web -root, is /w (so, e.g., /var/www/w). Rewrite rules can then be used to enable -"pretty URLs" like /wiki/Article instead of /w/index.php?title=Article. (This +root, is /w (so, e.g., /var/www/w). Rewrite rules can then be used to enable +"pretty URLs" like /wiki/Article instead of /w/index.php?title=Article. (This is the convention Wikipedia uses.) In theory, it should be possible to enable the appropriate rewrite rules by default, if you can reconfigure the web -server, but you'd need to alter LocalSettings.php too. See +server, but you'd need to alter LocalSettings.php too. See for details on short URLs. If you really must mess around with the directory structure, note that the @@ -59,37 +59,38 @@ following files *must* all be web-accessible for MediaWiki to function correctly: * api.php, img_auth.php, index.php, load.php, opensearch_desc.php, thumb.php, - profileinfo.php, redirect.php, trackback.php. These are the entry points for - normal usage. This list may be incomplete and is subject to change. + profileinfo.php. These are the entry points for normal usage. This list may be + incomplete and is subject to change. * mw-config/index.php: Used for web-based installation (sets up the database, prompts for the name of the wiki, etc.). - * images/: Used for uploaded files. This could be somewhere else if + * images/: Used for uploaded files. This could be somewhere else if $wgUploadDirectory and $wgUploadPath are changed appropriately. * skins/*/: Subdirectories of skins/ contain CSS and JavaScript files that - must be accessible to web browsers. The PHP files and Skin.sample in skins/ - don't need to be accessible. This could be somewhere else if + must be accessible to web browsers. The PHP files and Skin.sample in skins/ + don't need to be accessible. This could be somewhere else if $wgStyleDirectory and $wgStylePath are changed appropriately. * extensions/: Many extensions include CSS and JavaScript files in their - extensions directory, and will break if they aren't web-accessible. Some + extensions directory, and will break if they aren't web-accessible. Some extensions might theoretically provide additional entry points as well, at least in principle. But all files should keep their position relative to the web-visible -installation directory no matter what. If you must move includes/ somewhere in -/usr/share, provide a symlink from /var/www/w. If you don't, you *will* break -something. You have been warned. +installation directory no matter what. If you must move includes/ somewhere in +/usr/share, provide a symlink from /var/www/w. If you don't, you *will* break +something. You have been warned. == Configuration == -MediaWiki is configured using LocalSettings.php. This is a PHP file that's +MediaWiki is configured using LocalSettings.php. This is a PHP file that's generated when the user visits mw-config/index.php to install the software, and -which the user can edit by hand thereafter. It's just a plain old PHP file, -and can contain any PHP statements. It usually sets global variables that are +which the user can edit by hand thereafter. It's just a plain old PHP file, +and can contain any PHP statements. It usually sets global variables that are used for configuration, and includes files used by any extensions. -Distributors can easily add extra statements to the autogenerated -LocalSettings.php by changing mw-config/overrides.php (see that file for details -and examples). +Distributors can easily change the installer behavior, including LocalSettings +generated, by placing their overrides into mw-config/overrides directory. Doing +that is highly preferred to modifying MediaWiki code directly. See +mw-config/overrides/README for more details and examples. There's a new maintenance/install.php script which could be used for performing an install through the command line. @@ -98,7 +99,7 @@ Some configuration options that distributors might be in a position to set intelligently: * $wgEmergencyContact: An e-mail address that can be used to contact the wiki - administrator. By default, "wikiadmin@ServerName". + administrator. By default, "wikiadmin@ServerName". * $wgPasswordSender: The e-mail address to use when sending password e-mails. By default, "MediaWiki Mail ". (with ServerName guessed from the http request) @@ -115,16 +116,16 @@ Any package manager which replaces the files but doesn't update the db is leavin an inconsistent wiki that may produce blank pages (php errors) when new features using the changed schema would be used. -Since MediaWiki 1.17 it is possible to upgrade using the installer by providing +Since MediaWiki 1.17 it is possible to upgrade using the web installer by providing an arbitrary secret value stored as $wgUpgradeKey in LocalSettings (older versions needed to rename LocalSettings.php in order to upgrade using the installer). == Documentation == MediaWiki's official documentation is split between two places: the source -code, and . The source code documentation is written +code, and . The source code documentation is written exclusively by developers, and so is likely to be reliable (at worst, -outdated). However, it can be pretty sparse. mediawiki.org documentation is +outdated). However, it can be pretty sparse. mediawiki.org documentation is often much more thorough, but it's maintained by a wiki that's open to anonymous edits, so its quality is sometimes sketchy -- don't assume that anything there is officially endorsed! @@ -132,31 +133,27 @@ anything there is officially endorsed! == Upstream == MediaWiki is a project hosted and led by the Wikimedia Foundation, the -not-for-profit charity that operates Wikipedia. Wikimedia employs the lead +not-for-profit charity that operates Wikipedia. Wikimedia employs the lead developer and several other paid developers, but commit access is given out -liberally and there are multiple very active volunteer developers as well. A +liberally and there are multiple very active volunteer developers as well. A list of developers can be found at . -MediaWiki's bug tracker is at . However, most -developers follow the bug tracker little or not at all. The best place to -post if you want to get developers' attention is the wikitech-l mailing list -. Posts to wikitech-l -will inevitably be read by multiple experienced MediaWiki developers. There's +MediaWiki's bug tracker is at . However, you +might find that the best place to post if you want to get developers' attention +is the wikitech-l mailing list +. Posts to wikitech-l +will inevitably be read by multiple experienced MediaWiki developers. There's also an active IRC chat at , where there are usually several developers at reasonably busy times of day. -Unfortunately, we don't have a very good system for patch review. Patches -should be submitted on Bugzilla (as unified diffs produced with "svn diff" -against the latest trunk revision), but many patches languish without review -until they bitrot into uselessness. You might want to get a developer to -commit to reviewing your patch before you put too much effort into it. -Reasonably straightforward patches shouldn't be too hard to get accepted if -there's an interested developer, however -- posting to Bugzilla and then -dropping a note on wikitech-l if nobody responds is a good tactic. +Our Git repositories are hosted at , see + for more information. Patches should +be submitted there. If you know which developers are best suited to review your +patch, add them to it, otherwise ask on IRC to get better review time. All redistributors of MediaWiki should be subscribed to mediawiki-announce -. It's -extremely low-traffic, with an average of less than one post per month. All +. It's +extremely low-traffic, with an average of less than one post per month. All new releases are announced here, including critical security updates. == Useful software to install == @@ -167,41 +164,40 @@ perhaps configure it to use them (see Configuration section of this document): * APC (Alternative PHP Cache), XCache, or similar: Will greatly speed up the execution of MediaWiki, and all other PHP applications, at some cost in - memory usage. Will be used automatically for the most part. - * clamav: Can be used for virus scanning of uploaded files. Enable with + memory usage. Will be used automatically for the most part. + * clamav: Can be used for virus scanning of uploaded files. Enable with "$wgAntivirus = 'clamav';". - * DjVuLibre: Allows processing of DjVu files. To enable this, set + * DjVuLibre: Allows processing of DjVu files. To enable this, set "$wgDjvuDump = 'djvudump'; $wgDjvuRenderer = 'ddjvu'; $wgDjvuTxt = 'djvutxt';". - * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with + * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with "$wgUseTidy = true;". - * ImageMagick: For resizing images. "$wgUseImageMagick = true;" will enable - it. PHP's GD can also be used, but ImageMagick is preferable. - * Squid: Can provide a drastic speedup and a major cut in resource - consumption, but enabling it may interfere with other applications. It might - be suitable for a separate mediawiki-squid package. For setup details, see: - + * ImageMagick: For resizing images. "$wgUseImageMagick = true;" will enable + it. PHP's GD can also be used, but ImageMagick is preferable. + * HTTP cache such as Varnish or Squid: can provide a drastic speedup and a + major cut in resource consumption, but enabling it may interfere with other + applications. It might be suitable for a separate package. For setup details, see: + - + - * rsvg or other SVG rasterizer: ImageMagick can be used for SVG support, but - is not ideal. Wikipedia (as of the time of this writing) uses rsvg. To + is not ideal. Wikipedia (as of the time of this writing) uses rsvg. To enable, set "$wgSVGConverter = 'rsvg';" (or other as appropriate). - * texvc: Included with MediaWiki. Instructions for compiling and - installing it are in the math/ directory. -MediaWiki uses some standard GNU utilities as well, such as diff and diff3. If +MediaWiki uses some standard GNU utilities as well, such as diff and diff3. If these are present in /usr/bin or some other reasonable location, they will be configured automatically on install. -MediaWiki also has a "job queue" that handles background processing. Because +MediaWiki also has a "job queue" that handles background processing. Because shared hosts often don't provide access to cron, the job queue is run on every -page view by default. This means the background tasks aren't really done in -the background. Busy wikis can set $wgJobRunRate to 0 and run -maintenance/runJobs.php periodically out of cron. Distributors probably +page view by default. This means the background tasks aren't really done in +the background. Busy wikis can set $wgJobRunRate to 0 and run +maintenance/runJobs.php periodically out of cron. Distributors probably shouldn't set this up as a default, however, since the extra cron job is unnecessary overhead for a little-used wiki. == Web server configuration == MediaWiki includes several .htaccess files to restrict access to some -directories. If the web server is not configured to support these files, and +directories. If the web server is not configured to support these files, and the relevant directories haven't been moved someplace inaccessible anyway (e.g. symlinked in /usr/share with the web server configured to not follow symlinks), then it might be useful to deny web access to those directories in the web diff --git a/docs/extension.schema.json b/docs/extension.schema.json index 3235c95146..c01001421d 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -417,6 +417,10 @@ "type": "string", "description": "Group with which this module should be loaded" }, + "deprecated": { + "type": ["object", "boolean"], + "description": "Whether the module is deprecated and usage is discouraged. Either a boolean or an object with key message can be used to customise deprecation message." + }, "position": { "type": "string", "description": "Position on the page to load this module at", @@ -625,6 +629,11 @@ "capitallinkoverride": { "type": "boolean", "description": "Set $wgCapitalLinks on a per-namespace basis" + }, + "conditional": { + "type": "boolean", + "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)", + "default": false } }, "required": ["id", "constant", "name"] @@ -857,20 +866,22 @@ ], "description": "A function to be called right after MediaWiki processes this file" }, + "config_prefix": { + "type": "string", + "default": "wg", + "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS" + }, "config": { "type": "object", "description": "Configuration options for this extension", - "properties": { - "_prefix": { - "type": "string", - "default": "wg", - "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS" - } - }, "patternProperties": { "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": { + "type": "object", "properties": { - "_merge_strategy": { + "value": { + "required": true + }, + "merge_strategy": { "type": "string", "enum": [ "array_merge_recursive", @@ -879,6 +890,15 @@ "array_merge" ], "default": "array_merge" + }, + "path": { + "description": "Whether this should be interpreted as a filesystem path, relative to extension directory root", + "type": "boolean", + "default": false + }, + "description": { + "type": ["string", "array"], + "description": "A description of the config setting, mostly for documentation/developers" } } } diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json new file mode 100644 index 0000000000..d7078648aa --- /dev/null +++ b/docs/extension.schema.v1.json @@ -0,0 +1,895 @@ +{ + "$schema": "http://json-schema.org/schema#", + "description": "MediaWiki extension.json schema", + "type": "object", + "properties": { + "manifest_version": { + "type": "integer", + "description": "Version of the extension.json schema the extension.json file is in.", + "required": true + }, + "name": { + "type": "string", + "description": "The extension's canonical name.", + "required": true + }, + "namemsg": { + "type": "string", + "description": "i18n message key of the extension's name." + }, + "type": { + "type": "string", + "description": "The extension's type, as an index to $wgExtensionCredits.", + "default": "other" + }, + "author": { + "type": [ + "string", + "array" + ], + "description": "Extension's authors.", + "items": { + "type": "string" + } + }, + "version": { + "type": "string", + "description": "The version of this release of the extension." + }, + "url": { + "type": "string", + "description": "URL to the homepage for the extension.", + "format": "uri" + }, + "description": { + "type": "string", + "description": "Raw description of the extension." + }, + "descriptionmsg": { + "type": "string", + "description": "Message key for a i18n message describing the extension." + }, + "license-name": { + "type": "string", + "description": "Short identifier for the license under which the extension is released.", + "enum": [ + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "APL-1.0", + "Aladdin", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0", + "Artistic-1.0-cl8", + "Artistic-1.0-Perl", + "Artistic-2.0", + "AAL", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BSL-1.0", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-3-Clause", + "BSD-3-Clause-Clear", + "BSD-4-Clause", + "BSD-4-Clause-UC", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPOL-1.02", + "CDDL-1.0", + "CDDL-1.1", + "CPAL-1.0", + "CPL-1.0", + "CATOSL-1.1", + "Condor-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC0-1.0", + "CUA-OPL-1.0", + "D-FSL-1.0", + "WTFPL", + "EPL-1.0", + "eCos-2.0", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "Entessa", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "Fair", + "Frameworx-1.0", + "FTL", + "AGPL-1.0", + "AGPL-3.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-1.0+", + "GPL-2.0", + "GPL-2.0+", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-2.0-with-GCC-exception", + "GPL-3.0", + "GPL-3.0+", + "GPL-3.0-with-autoconf-exception", + "GPL-3.0-with-GCC-exception", + "LGPL-2.1", + "LGPL-2.1+", + "LGPL-3.0", + "LGPL-3.0+", + "LGPL-2.0", + "LGPL-2.0+", + "gSOAP-1.3b", + "HPND", + "IBM-pibs", + "IPL-1.0", + "Imlib2", + "IJG", + "Intel", + "IPA", + "ISC", + "JSON", + "LPPL-1.3a", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3c", + "Libpng", + "LPL-1.02", + "LPL-1.0", + "MS-PL", + "MS-RL", + "MirOS", + "MIT", + "Motosoto", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "Multics", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NGPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "Nokia", + "NPOSL-3.0", + "NTP", + "OCLC-2.0", + "ODbL-1.0", + "PDDL-1.0", + "OGTSL", + "OLDAP-2.2.2", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OPL-1.0", + "OSL-1.0", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OLDAP-2.8", + "OpenSSL", + "PHP-3.0", + "PHP-3.01", + "PostgreSQL", + "Python-2.0", + "QPL-1.0", + "RPSL-1.0", + "RPL-1.1", + "RPL-1.5", + "RHeCos-1.1", + "RSCPL", + "Ruby", + "SAX-PD", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "OFL-1.0", + "OFL-1.1", + "SimPL-2.0", + "Sleepycat", + "SMLNJ", + "SugarCRM-1.1.3", + "SISSL", + "SISSL-1.2", + "SPL-1.0", + "Watcom-1.0", + "NCSA", + "VSL-1.0", + "W3C", + "WXwindows", + "Xnet", + "X11", + "XFree86-1.1", + "YPL-1.0", + "YPL-1.1", + "Zimbra-1.3", + "Zlib", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "Unlicense" + ] + }, + "requires": { + "type": "object", + "description": "Indicates what versions of MediaWiki core are required. This syntax may be extended in the future, for example to check dependencies between other extensions.", + "properties": { + "MediaWiki": { + "type": "string", + "description": "Version constraint string against MediaWiki core." + } + } + }, + "ResourceFileModulePaths": { + "type": "object", + "description": "Default paths to use for all ResourceLoader file modules", + "additionalProperties": false, + "properties": { + "localBasePath": { + "type": "string", + "description": "Base path to prepend to all local paths, relative to current directory" + }, + "remoteExtPath": { + "type": "string", + "description": "Base path to prepend to all remote paths, relative to $wgExtensionAssetsPath" + }, + "remoteSkinPath": { + "type": "string", + "description": "Base path to prepend to all remote paths, relative to $wgStylePath" + } + } + }, + "ResourceModules": { + "type": "object", + "description": "ResourceLoader modules to register", + "patternProperties": { + "^[a-zA-Z0-9-\\.]+$": { + "type": "object", + "anyOf": [ + { + "description": "A ResourceLoaderFileModule definition", + "additionalProperties": false, + "properties": { + "localBasePath": { + "type": "string", + "description": "Base path to prepend to all local paths in $options. Defaults to $IP" + }, + "remoteBasePath": { + "type": "string", + "description": "Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath" + }, + "remoteExtPath": { + "type": "string", + "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath" + }, + "skipFunction": { + "type": "string", + "description": "Path to a file containing a JavaScript \"skip function\", if desired." + }, + "scripts": { + "type": ["string", "array"], + "description": "Scripts to always include (array of file paths)", + "items": { + "type": "string" + } + }, + "languageScripts": { + "type": "object", + "description": "Scripts to include in specific language contexts (mapping of language code to file path(s))", + "patternProperties": { + "^[a-zA-Z0-9-]{2,}$": { + "type": [ + "string", + "array" + ], + "items": { + "type": "string" + } + } + } + }, + "skinScripts": { + "type": "object", + "description": "Scripts to include in specific skin contexts (mapping of skin name to script(s)", + "patternProperties": { + ".+": { + "type": [ + "string", + "array" + ], + "items": { + "type": "string" + } + } + } + }, + "debugScripts": { + "type": ["string", "array"], + "description": "Scripts to include in debug contexts", + "items": { + "type": "string" + } + }, + "loaderScripts": { + "type": ["string", "array"], + "description": "Scripts to include in the startup module", + "items": { + "type": "string" + } + }, + "dependencies": { + "type": ["string", "array"], + "description": "Modules which must be loaded before this module", + "items": { + "type": "string" + } + }, + "styles": { + "type": ["string", "array", "object"], + "description": "Styles to always load", + "items": { + "type": "string" + } + }, + "skinStyles": { + "type": "object", + "description": "Styles to include in specific skin contexts (mapping of skin name to style(s))", + "patternProperties": { + ".+": { + "type": [ + "string", + "array" + ], + "items": { + "type": "string" + } + } + } + }, + "messages": { + "type": ["string", "array"], + "description": "Messages to always load", + "items": { + "type": "string" + } + }, + "group": { + "type": "string", + "description": "Group which this module should be loaded together with" + }, + "deprecated": { + "type": ["object", "boolean"], + "description": "Whether the module is deprecated and usage is discouraged. Either a boolean or an object with key message can be used to customise deprecation message." + }, + "position": { + "type": "string", + "description": "Position on the page to load this module at", + "enum": [ + "bottom", + "top" + ] + }, + "templates": { + "type": ["object", "array"], + "description": "Templates to be loaded for client-side usage" + }, + "targets": { + "type": ["string", "array"], + "description": "ResourceLoader target the module can run on", + "items": { + "type": "string" + } + } + } + }, + { + "description": "A ResourceLoaderWikiModule definition", + "additionalProperties": false, + "properties": { + "class": { + "enum": ["ResourceLoaderWikiModule"] + }, + "group": { + "type": "string", + "description": "Group which this module should be loaded together with" + }, + "position": { + "type": "string", + "description": "Position on the page to load this module at", + "enum": [ + "bottom", + "top" + ] + }, + "targets": { + "type": ["string", "array"], + "description": "ResourceLoader target the module can run on", + "items": { + "type": "string" + } + }, + "scripts": { + "type": "array", + "items": { + "type": "string" + } + }, + "styles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "description": "A ResourceLoaderImageModule definition", + "additionalProperties": false, + "properties": { + "class": { + "enum": ["ResourceLoaderImageModule"] + }, + "data": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "selector": { + "type": "string" + }, + "selectorWithoutVariant": { + "type": "string" + }, + "selectorWithVariant": { + "type": "string" + }, + "variants": { + "type": "object" + }, + "images": { + "type": "object" + }, + "position": { + "enum": [ + "top", + "bottom" + ] + } + } + }, + { + "description": "An arbitrary ResourceLoaderModule definition", + "properties": { + "class": { + "type": "string", + "pattern": "^((?!ResourceLoader(File|Image)Module).)*$" + } + }, + "required": ["class"] + } + ] + } + } + }, + "ResourceModuleSkinStyles": { + "type": "object", + "description": "ResourceLoader modules for custom skin styles" + }, + "ResourceLoaderSources": { + "type": "object", + "description": "ResourceLoader sources to register" + }, + "ResourceLoaderLESSVars": { + "type": "object", + "description": "ResourceLoader LESS variables" + }, + "ConfigRegistry": { + "type": "object", + "description": "Registry of factory functions to create Config objects" + }, + "SessionProviders": { + "type": "object", + "description": "Session providers" + }, + "AuthManagerAutoConfig": { + "type": "object", + "description": "AuthManager auto-configuration", + "additionalProperties": false, + "properties": { + "preauth": { + "type": "object", + "description": "Pre-authentication providers" + }, + "primaryauth": { + "type": "object", + "description": "Primary authentication providers" + }, + "secondaryauth": { + "type": "object", + "description": "Secondary authentication providers" + } + } + }, + "CentralIdLookupProviders": { + "type": "object", + "description": "Central ID lookup providers" + }, + "namespaces": { + "type": "array", + "description": "Method to add extra namespaces", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "constant": { + "type": "string" + }, + "name": { + "type": "string" + }, + "gender": { + "type": "object", + "properties": { + "male": { + "type": "string" + }, + "female": { + "type": "string" + } + } + }, + "subpages": { + "type": "boolean", + "default": false + }, + "content": { + "type": "boolean", + "default": false + }, + "defaultcontentmodel": { + "type": "string" + }, + "protection": { + "type": ["string", "array"], + "description": "Userright(s) required to edit in this namespace" + }, + "capitallinkoverride": { + "type": "boolean", + "description": "Set $wgCapitalLinks on a per-namespace basis" + }, + "conditional": { + "type": "boolean", + "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)", + "default": false + } + }, + "required": ["id", "constant", "name"] + } + }, + "TrackingCategories": { + "type": "array", + "description": "Tracking category message keys", + "items": { + "type": "string" + } + }, + "DefaultUserOptions": { + "type": "object", + "description": "Default values of user options" + }, + "HiddenPrefs": { + "type": "array", + "description": "Preferences users cannot set", + "items": { + "type": "string" + } + }, + "GroupPermissions": { + "type": "object", + "description": "Default permissions to give to user groups", + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "type": "boolean" + } + } + } + } + }, + "RevokePermissions": { + "type": "object", + "description": "Default permissions to revoke from user groups", + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "type": "boolean" + } + } + } + } + }, + "GrantPermissions": { + "type": "object", + "description": "Map of permissions granted to authorized consumers to their bundles, called 'grants'", + "patternProperties": { + "^[a-z]+$": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "type": "boolean" + } + } + } + } + }, + "GrantPermissionGroups": { + "type": "object", + "description": "Map of grants to their UI grouping", + "patternProperties": { + "^[a-z]+$": { + "type": "string" + } + } + }, + "ImplicitGroups": { + "type": "array", + "description": "Implicit groups" + }, + "GroupsAddToSelf": { + "type": "object", + "description": "Groups a user can add to themselves" + }, + "GroupsRemoveFromSelf": { + "type": "object", + "description": "Groups a user can remove from themselves" + }, + "AddGroups": { + "type": "object", + "description": "Groups a user can add to users" + }, + "RemoveGroups": { + "type": "object", + "description": "Groups a user can remove from users" + }, + "AvailableRights": { + "type": "array", + "description": "User rights added by the extension", + "items": { + "type": "string" + } + }, + "ContentHandlers": { + "type": "object", + "description": "Mapping of model ID to class name", + "patternProperties": { + "^[A-Za-z]+$": { + "type": "string" + } + } + }, + "RateLimits": { + "type": "object", + "description": "Rate limits" + }, + "RecentChangesFlags": { + "type": "object", + "description": "Flags (letter symbols) shown on RecentChanges pages" + }, + "MediaHandlers": { + "type": "object", + "description": "Plugins for media file type handling. Each entry in the array maps a MIME type to a PHP class name." + }, + "ExtensionFunctions": { + "type": [ + "array", + "string" + ], + "description": "Function to call after setup has finished", + "items": { + "type": "string" + } + }, + "ExtensionMessagesFiles": { + "type": "object", + "description": "File paths containing PHP internationalization data" + }, + "MessagesDirs": { + "type": "object", + "description": "Directory paths containing JSON internationalization data" + }, + "ExtensionEntryPointListFiles": { + "type": "object" + }, + "SpecialPages": { + "type": "object", + "description": "SpecialPages implemented in this extension (mapping of page name to class name)" + }, + "AutoloadClasses": { + "type": "object" + }, + "Hooks": { + "type": [ "string", "object" ], + "description": "Hooks this extension uses (mapping of hook name to callback)" + }, + "JobClasses": { + "type": "object", + "description": "Job types this extension implements (mapping of job type to class name)" + }, + "LogTypes": { + "type": "array", + "description": "List of new log types this extension uses" + }, + "LogRestrictions": { + "type": "object" + }, + "FilterLogTypes": { + "type": "object" + }, + "ActionFilteredLogs": { + "type": "object", + "description": "List of log types which can be filtered by log actions", + "patternProperties": { + "^[a-z-]+$": { + "type": "object", + "patternProperties": { + "^[a-z-]+$": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "LogNames": { + "type": "object" + }, + "LogHeaders": { + "type": "object" + }, + "LogActions": { + "type": "object" + }, + "LogActionsHandlers": { + "type": "object" + }, + "Actions": { + "type": "object" + }, + "APIModules": { + "type": "object" + }, + "APIFormatModules": { + "type": "object" + }, + "APIMetaModules": { + "type": "object" + }, + "APIPropModules": { + "type": "object" + }, + "APIListModules": { + "type": "object" + }, + "ValidSkinNames": { + "type": "object" + }, + "FeedClasses": { + "type": "object", + "description": "Available feeds objects" + }, + "SkinOOUIThemes": { + "type": "object" + }, + "callback": { + "type": [ + "array", + "string" + ], + "description": "A function to be called right after MediaWiki processes this file" + }, + "config": { + "type": "object", + "description": "Configuration options for this extension", + "properties": { + "_prefix": { + "type": "string", + "default": "wg", + "description": "Prefix to put in front of configuration settings when exporting them to $GLOBALS" + } + }, + "patternProperties": { + "^[a-zA-Z_\u007f-\u00ff][a-zA-Z0-9_\u007f-\u00ff]*$": { + "properties": { + "_merge_strategy": { + "type": "string", + "enum": [ + "array_merge_recursive", + "array_plus_2d", + "array_plus", + "array_merge" + ], + "default": "array_merge" + } + } + } + } + }, + "ParserTestFiles": { + "type": "array", + "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it" + }, + "load_composer_autoloader": { + "type": "boolean", + "description": "Load the composer autoloader for this extension, if one is present" + } + } +} diff --git a/docs/hooks.txt b/docs/hooks.txt index 78f9cdb192..8fa3793d8f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -608,6 +608,7 @@ $reason: the reason the article was deleted $id: id of the article that was deleted $content: the Content of the deleted page $logEntry: the ManualLogEntry used to record the deletion +$archivedRevisionCount: the number of revisions archived during the deletion 'ArticleEditUpdateNewTalk': Before updating user_newtalk when a user talk page was changed. @@ -903,6 +904,7 @@ $image: File 'BlockIpComplete': After an IP address or user is blocked. $block: the Block object that was saved $user: the user who did the block (not the one being blocked) +$priorBlock: the Block object for the prior block or null if there was none 'BookInformation': Before information output on Special:Booksources. $isbn: ISBN to show information for @@ -1102,6 +1104,9 @@ $row: the DB row for this line $id: User identifier $title: User page title &$tools: Array of tool links +$specialPage: SpecialPage instance for context and services. Can be either + SpecialContributions or DeletedContributionsPage. Extensions should type + hint against a generic SpecialPage though. 'ConvertContent': Called by AbstractContent::convert when a conversion to another content model is requested. @@ -2438,24 +2443,12 @@ cache or return false to not use it. &$parser: Parser object &$varCache: variable cache (array) -'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare and -ParserLimitReportFormat instead. +'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare instead. Called at the end of Parser:parse() when the parser will include comments about size of the text parsed. $parser: Parser object &$limitReport: text that will be included (without comment tags) -'ParserLimitReportFormat': Called for each row in the parser limit report that -needs formatting. If nothing handles this hook, the default is to use "$key" to -get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to -format the value. -$key: Key for the limit report item (string) -&$value: Value of the limit report item -&$report: String onto which to append the data -$isHTML: If true, $report is an HTML table with two columns; if false, it's - text intended for display in a monospaced font. -$localize: If false, $report should be output in English. - 'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser will include comments about size of the text parsed. Hooks should use $output->setLimitReportData() to populate data. Functions for this hook should @@ -2710,6 +2703,18 @@ search results. $title: Current Title object being displayed in search results. &$id: Revision ID (default is false, for latest) +'SearchIndexFields': Add fields to search index mapping. +&$fields: Array of fields, all implement SearchIndexField +$engine: SearchEngine instance for which mapping is being built. + +'SearchDataForIndex': Add data to search document. Allows to add any data to +the field map used to index the document. +&$fields: Array of name => value pairs for fields +$handler: ContentHandler for the content being indexed +$page: WikiPage that is being indexed +$output: ParserOutput that is produced from the page +$engine: SearchEngine for which the indexing is intended + 'SecondaryDataUpdates': Allows modification of the list of DataUpdates to perform when page content is modified. Currently called by AbstractContent::getSecondaryDataUpdates. @@ -3381,9 +3386,10 @@ in most cases over UploadVerification. $upload: (object) an instance of UploadBase, with all info about the upload $mime: (string) The uploaded file's MIME type, as detected by MediaWiki. Handlers will typically only apply for specific MIME types. -&$error: (object) output: true if the file is valid. Otherwise, an indexed array - representing the problem with the file, where the first element is the message - key and the remaining elements are used as parameters to the message. +&$error: (object) output: true if the file is valid. Otherwise, set this to the reason + in the form of array( messagename, param1, param2, ... ) or a MessageSpecifier + instance (you might want to use ApiMessage to provide machine-readable details + for the API). 'UploadVerifyUpload': Upload verification, based on both file properties like MIME type (same as UploadVerifyFile) and the information entered by the user @@ -3544,6 +3550,9 @@ $user: User object for the logged-in user For functionality that needs to run after any login (API or web) use UserLoggedIn. &$user: the user object that was created on login &$inject_html: Any HTML to inject after the "logged in" message. +$direct: (bool) The hook is called directly after a successful login. This will only happen once + per login. A UserLoginComplete call with direct=false can happen when the user visits the login + page while already logged in. 'UserLoginForm': DEPRECATED! Create an AuthenticationProvider instead. Manipulate the login form. diff --git a/extensions/README b/extensions/README index 923a19b705..5c9bf53933 100644 --- a/extensions/README +++ b/extensions/README @@ -1,9 +1,12 @@ +== User Information == + Extensions are distributed separately. Drop them into this directory and enable as per the extension's installation instructions. You can find a list of extensions and documentation at -. +. +== Development Information == If you are a developer, you might want to fetch the extension tree in another directory and make a symbolic link: diff --git a/img_auth.php b/img_auth.php index d63618817a..fa1609f963 100644 --- a/img_auth.php +++ b/img_auth.php @@ -162,13 +162,21 @@ function wfImageAuthMain() { } } + $options = []; // HTTP header options + if ( isset( $_SERVER['HTTP_RANGE'] ) ) { + $options['range'] = $_SERVER['HTTP_RANGE']; + } + if ( isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { + $options['if-modified-since'] = $_SERVER['HTTP_IF_MODIFIED_SINCE']; + } + if ( $request->getCheck( 'download' ) ) { $headers[] = 'Content-Disposition: attachment'; } // Stream the requested file wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." ); - $repo->streamFile( $filename, $headers ); + $repo->streamFile( $filename, $headers, $options ); } /** diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 883b8a32c1..8dc7d4094a 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -81,18 +81,6 @@ class AutoLoader { require $filename; } - /** - * Force a class to be run through the autoloader, helpful for things like - * Sanitizer that have define()s outside of their class definition. Of course - * this wouldn't be necessary if everything in MediaWiki was class-based. Sigh. - * - * @param string $class - * @return bool Return the results of class_exists() so we know if we were successful - */ - static function loadClass( $class ) { - return class_exists( $class ); - } - /** * Method to clear the protected class property $autoloadLocalClassesLower. * Used in tests. diff --git a/includes/Category.php b/includes/Category.php index 28b566a7f9..531e0be998 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -79,6 +79,11 @@ class Category { $this->mSubcats = 0; $this->mFiles = 0; + # If the title exists, call refreshCounts to add a row for it. + if ( $this->mTitle->exists() ) { + DeferredUpdates::addCallableUpdate( [ $this, 'refreshCounts' ] ); + } + return true; } else { return false; # Fail @@ -331,21 +336,35 @@ class Category { [ 'LOCK IN SHARE MODE' ] ); + $shouldExist = $result->pages > 0 || $this->getTitle()->exists(); + if ( $this->mID ) { - # The category row already exists, so do a plain UPDATE instead - # of INSERT...ON DUPLICATE KEY UPDATE to avoid creating a gap - # in the cat_id sequence. The row may or may not be "affected". - $dbw->update( - 'category', - [ - 'cat_pages' => $result->pages, - 'cat_subcats' => $result->subcats, - 'cat_files' => $result->files - ], - [ 'cat_title' => $this->mName ], - __METHOD__ - ); - } else { + if ( $shouldExist ) { + # The category row already exists, so do a plain UPDATE instead + # of INSERT...ON DUPLICATE KEY UPDATE to avoid creating a gap + # in the cat_id sequence. The row may or may not be "affected". + $dbw->update( + 'category', + [ + 'cat_pages' => $result->pages, + 'cat_subcats' => $result->subcats, + 'cat_files' => $result->files + ], + [ 'cat_title' => $this->mName ], + __METHOD__ + ); + } else { + # The category is empty and has no description page, delete it + $dbw->delete( + 'category', + [ 'cat_title' => $this->mName ], + __METHOD__ + ); + $this->mID = false; + } + } elseif ( $shouldExist ) { + # The category row doesn't exist but should, so create it. Use + # upsert in case of races. $dbw->upsert( 'category', [ @@ -362,6 +381,8 @@ class Category { ], __METHOD__ ); + // @todo: Should we update $this->mID here? Or not since Category + // objects tend to be short lived enough to not matter? } $dbw->endAtomic( __METHOD__ ); diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php index 3f0528ebe0..3d5e6c58ab 100644 --- a/includes/CategoryFinder.php +++ b/includes/CategoryFinder.php @@ -33,8 +33,8 @@ * * $cf = new CategoryFinder; * $cf->seed( - * array( 12345 ), - * array( 'Category 1', 'Category 2' ), + * [ 12345 ], + * [ 'Category 1', 'Category 2' ], * 'AND' * ); * $a = $cf->run(); @@ -49,7 +49,7 @@ class CategoryFinder { /** @var array Array of DBKEY category names for categories that don't have a page */ protected $deadend = []; - /** @var array Array of [ID => array()] */ + /** @var array Array of [ ID => [] ] */ protected $parents = []; /** @var array Array of article/category IDs */ diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 389b077474..490f548135 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -407,11 +407,26 @@ class CategoryViewer extends ContextSource { return $r; } + /** + * Return pretty name which is display name if given and different from prefix text or + * the unprefixed page name. + * + * @return string HTML safe name. + */ + function getPrettyPageNameHtml() { + $displayTitle = $this->getOutput()->getPageTitle(); + if ( $displayTitle === $this->getTitle()->getPrefixedText() ) { + return htmlspecialchars( $this->getTitle()->getText() ); + } else { + return $displayTitle; + } + } + /** * @return string */ function getPagesSection() { - $ti = wfEscapeWikiText( $this->title->getText() ); + $name = $this->getPrettyPageNameHtml(); # Don't show articles section if there are none. $r = ''; @@ -427,7 +442,7 @@ class CategoryViewer extends ContextSource { if ( $rescnt > 0 ) { $r = "
\n"; - $r .= '

' . $this->msg( 'category_header', $ti )->parse() . "

\n"; + $r .= '

' . $this->msg( 'category_header' )->rawParams( $name )->parse() . "

\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks( 'page' ); $r .= $this->formatList( $this->articles, $this->articles_start_char ); @@ -441,6 +456,7 @@ class CategoryViewer extends ContextSource { * @return string */ function getImageSection() { + $name = $this->getPrettyPageNameHtml(); $r = ''; $rescnt = $this->showGallery ? $this->gallery->count() : count( $this->imgsNoGallery ); $dbcnt = $this->cat->getFileCount(); @@ -450,10 +466,7 @@ class CategoryViewer extends ContextSource { if ( $rescnt > 0 ) { $r .= "
\n"; $r .= '

' . - $this->msg( - 'category-media-header', - wfEscapeWikiText( $this->title->getText() ) - )->text() . + $this->msg( 'category-media-header' )->rawParams( $name )->parse() . "

\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks( 'file' ); @@ -532,17 +545,17 @@ class CategoryViewer extends ContextSource { } /** - * Format a list of articles chunked by letter in a three-column - * list, ordered vertically. + * Format a list of articles chunked by letter in a three-column list, ordered + * vertically. This is used for categories with a significant number of pages. * * TODO: Take the headers into account when creating columns, so they're * more visually equal. * * TODO: shortList and columnList are similar, need merging * - * @param array $articles - * @param string[] $articles_start_char - * @return string + * @param string[] $articles HTML links to each article + * @param string[] $articles_start_char The header characters for each article + * @return string HTML to output * @private */ static function columnList( $articles, $articles_start_char ) { @@ -579,10 +592,11 @@ class CategoryViewer extends ContextSource { } /** - * Format a list of articles chunked by letter in a bullet list. - * @param array $articles - * @param string[] $articles_start_char - * @return string + * Format a list of articles chunked by letter in a bullet list. This is used + * for categories with a small number of pages (when columns aren't needed). + * @param string[] $articles HTML links to each article + * @param string[] $articles_start_char The header characters for each article + * @return string HTML to output * @private */ static function shortList( $articles, $articles_start_char ) { diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f2e2420c12..3c5e2d2bf3 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -398,9 +398,13 @@ $wgAllowImageMoving = true; $wgEnableAsyncUploads = false; /** - * These are additional characters that should be replaced with '-' in filenames + * Additional characters that are not allowed in filenames. They are replaced with '-' when + * uploading. Like $wgLegalTitleChars, this is a regexp character class. + * + * Slashes and backslashes are disallowed regardless of this setting, but included here for + * completeness. */ -$wgIllegalFileChars = ":"; +$wgIllegalFileChars = ":\\/\\\\"; /** * What directory to place deleted uploads in. @@ -941,22 +945,11 @@ $wgTrustedMediaFormats = [ /** * Plugins for media file type handling. * Each entry in the array maps a MIME type to a class name + * + * Core media handlers are listed in MediaHandlerFactory, + * and extensions should use extension.json. */ -$wgMediaHandlers = [ - 'image/jpeg' => 'JpegHandler', - 'image/png' => 'PNGHandler', - 'image/gif' => 'GIFHandler', - 'image/tiff' => 'TiffHandler', - 'image/webp' => 'WebPHandler', - 'image/x-ms-bmp' => 'BmpHandler', - 'image/x-bmp' => 'BmpHandler', - 'image/x-xcf' => 'XCFHandler', - 'image/svg+xml' => 'SvgHandler', // official - 'image/svg' => 'SvgHandler', // compat - 'image/vnd.djvu' => 'DjVuHandler', // official - 'image/x.djvu' => 'DjVuHandler', // compat - 'image/x-djvu' => 'DjVuHandler', // compat -]; +$wgMediaHandlers = []; /** * Plugins for page content model handling. @@ -1444,7 +1437,10 @@ $wgGalleryOptions = [ 'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize 'imageWidth' => 120, // Width of the cells containing images in galleries (in "px") 'imageHeight' => 120, // Height of the cells containing images in galleries (in "px") - 'captionLength' => 25, // Length of caption to truncate (in characters) + 'captionLength' => true, // Deprecated @since 1.28 + // Length to truncate filename to in caption when using "showfilename". + // A value of 'true' will truncate the filename to one line using CSS + // and will be the behaviour after deprecation. 'showBytes' => true, // Show the filesize in bytes in categories 'mode' => 'traditional', ]; @@ -2517,7 +2513,7 @@ $wgFileCacheDepth = 2; /** * Kept for extension compatibility; see $wgParserCacheType - * @deprecated 1.26 + * @deprecated since 1.26 */ $wgEnableParserCache = true; @@ -2882,15 +2878,6 @@ $wgDummyLanguageCodes = [ 'zh-yue' => 'yue', ]; -/** - * Character set for use in the article edit box. Language-specific encodings - * may be defined. - * - * This historic feature is one of the first that was added by former MediaWiki - * team leader Brion Vibber, and is used to support the Esperanto x-system. - */ -$wgEditEncoding = ''; - /** * Set this to true to replace Arabic presentation forms with their standard * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is @@ -4216,6 +4203,8 @@ $wgAllowImageTag = false; * - RaggettInternalHHVM: Use the limited-functionality HHVM extension * - RaggettInternalPHP: Use the PECL extension * - RaggettExternal: Shell out to an external binary (tidyBin) + * - Html5Depurate: Use external Depurate service + * - Html5Internal: Use the built-in HTML5 balancer * * - tidyConfigFile: Path to configuration file for any of the Raggett drivers * - debugComment: True to add a comment to the output with warning messages @@ -8344,6 +8333,21 @@ $wgEventRelayerConfig = [ ] ]; +/** + * Share data about this installation with MediaWiki developers + * + * When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic + * data about this MediaWiki instance. This data includes, for example, the type of system, + * PHP version, and chosen database backend. The Wikimedia Foundation shares this data with + * MediaWiki developers to help guide future development efforts. + * + * For details about what data is sent, see: https://www.mediawiki.org/wiki/Pingback + * + * @var bool + * @since 1.28 + */ +$wgPingback = false; + /** * For really cool vim folding this needs to be at the end: * vim: foldmarker=@{,@} foldmethod=marker diff --git a/includes/DummyLinker.php b/includes/DummyLinker.php index d9330eebc2..ba24799818 100644 --- a/includes/DummyLinker.php +++ b/includes/DummyLinker.php @@ -47,7 +47,11 @@ class DummyLinker { ); } + /** + * @deprecated since 1.28, use LinkRenderer::getLinkClasses() instead + */ public function getLinkColour( $t, $threshold ) { + wfDeprecated( __METHOD__, '1.28' ); return Linker::getLinkColour( $t, $threshold ); } diff --git a/includes/EditPage.php b/includes/EditPage.php index 9c7ccdf1e4..ee0699383f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\Logger\LoggerFactory; + /** * The edit page/HTML interface (split from Article) * The actual database and text munging is still in Article, @@ -258,9 +260,6 @@ class EditPage { /** @var bool */ public $tooBig = false; - /** @var bool */ - public $kblength = false; - /** @var bool */ public $missingComment = false; @@ -394,6 +393,9 @@ class EditPage { /** @var bool */ protected $edit; + /** @var bool|int */ + protected $contentLength = false; + /** * @var bool Set in ApiEditPage, based on ContentHandler::allowsDirectApiEditing */ @@ -1249,9 +1251,31 @@ class EditPage { return $handler->makeEmptyContent(); } else { - # nasty side-effect, but needed for consistency - $this->contentModel = $rev->getContentModel(); - $this->contentFormat = $rev->getContentFormat(); + // Content models should always be the same since we error + // out if they are different before this point. + $logger = LoggerFactory::getInstance( 'editpage' ); + if ( $this->contentModel !== $rev->getContentModel() ) { + $logger->warning( "Overriding content model from current edit {prev} to {new}", [ + 'prev' => $this->contentModel, + 'new' => $rev->getContentModel(), + 'title' => $this->getTitle()->getPrefixedDBkey(), + 'method' => __METHOD__ + ] ); + $this->contentModel = $rev->getContentModel(); + } + + // Given that the content models should match, the current selected + // format should be supported. + if ( !$content->isSupportedFormat( $this->contentFormat ) ) { + $logger->warning( "Current revision content format unsupported. Overriding {prev} to {new}", [ + + 'prev' => $this->contentFormat, + 'new' => $rev->getContentFormat(), + 'title' => $this->getTitle()->getPrefixedDBkey(), + 'method' => __METHOD__ + ] ); + $this->contentFormat = $rev->getContentFormat(); + } return $content; } @@ -1286,7 +1310,7 @@ class EditPage { return $this->mPreloadContent; } - $handler = ContentHandler::getForTitle( $this->getTitle() ); + $handler = ContentHandler::getForModelID( $this->contentModel ); if ( $preload === '' ) { return $handler->makeEmptyContent(); @@ -1750,8 +1774,8 @@ class EditPage { return $status; } - $this->kblength = (int)( strlen( $this->textbox1 ) / 1024 ); - if ( $this->kblength > $wgMaxArticleSize ) { + $this->contentLength = strlen( $this->textbox1 ); + if ( $this->contentLength > $wgMaxArticleSize * 1024 ) { // Error will be displayed by showEditForm() $this->tooBig = true; $status->setResult( false, self::AS_CONTENT_TOO_BIG ); @@ -2038,8 +2062,8 @@ class EditPage { } // Check for length errors again now that the section is merged in - $this->kblength = (int)( strlen( $this->toEditText( $content ) ) / 1024 ); - if ( $this->kblength > $wgMaxArticleSize ) { + $this->contentLength = strlen( $this->toEditText( $content ) ); + if ( $this->contentLength > $wgMaxArticleSize * 1024 ) { $this->tooBig = true; $status->setResult( false, self::AS_MAX_ARTICLE_SIZE_EXCEEDED ); return $status; @@ -2690,8 +2714,9 @@ class EditPage { $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'hiddencats' ], Linker::formatHiddenCategories( $this->page->getHiddenCategories() ) ) ); - $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'limitreport' ], - self::getPreviewLimitReport( $this->mParserOutput ) ) ); + if ( $this->mParserOutput ) { + $wgOut->setLimitReportData( $this->mParserOutput->getLimitReportData() ); + } $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' ); @@ -2944,15 +2969,15 @@ class EditPage { 'wrap' => "
\n$1
" ] ); } - if ( $this->kblength === false ) { - $this->kblength = (int)( strlen( $this->textbox1 ) / 1024 ); + if ( $this->contentLength === false ) { + $this->contentLength = strlen( $this->textbox1 ); } - if ( $this->tooBig || $this->kblength > $wgMaxArticleSize ) { + if ( $this->tooBig || $this->contentLength > $wgMaxArticleSize * 1024 ) { $wgOut->wrapWikiMsg( "
\n$1\n
", [ 'longpageerror', - $wgLang->formatNum( $this->kblength ), + $wgLang->formatNum( round( $this->contentLength / 1024, 3 ) ), $wgLang->formatNum( $wgMaxArticleSize ) ] ); @@ -3026,7 +3051,7 @@ class EditPage { * @param string $summary The text of the summary to display */ protected function showSummaryInput( $isSubjectPreview, $summary = "" ) { - global $wgOut, $wgContLang; + global $wgOut; # Add a class if 'missingsummary' is triggered to allow styling of the summary line $summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary'; if ( $isSubjectPreview ) { @@ -3038,7 +3063,6 @@ class EditPage { return; } } - $summary = $wgContLang->recodeForEdit( $summary ); $labelText = wfMessage( $isSubjectPreview ? 'subject' : 'summary' )->parse(); list( $label, $input ) = $this->getSummaryInput( $summary, @@ -3419,41 +3443,12 @@ HTML return ''; } - $limitReport = Html::rawElement( 'div', [ 'class' => 'mw-limitReportExplanation' ], - wfMessage( 'limitreport-title' )->parseAsBlock() + return ResourceLoader::makeInlineScript( + ResourceLoader::makeConfigSetScript( + [ 'wgPageParseReport' => $output->getLimitReportData() ], + true + ) ); - - // Show/hide animation doesn't work correctly on a table, so wrap it in a div. - $limitReport .= Html::openElement( 'div', [ 'class' => 'preview-limit-report-wrapper' ] ); - - $limitReport .= Html::openElement( 'table', [ - 'class' => 'preview-limit-report wikitable' - ] ) . - Html::openElement( 'tbody' ); - - foreach ( $output->getLimitReportData() as $key => $value ) { - if ( Hooks::run( 'ParserLimitReportFormat', - [ $key, &$value, &$limitReport, true, true ] - ) ) { - $keyMsg = wfMessage( $key ); - $valueMsg = wfMessage( [ "$key-value-html", "$key-value" ] ); - if ( !$valueMsg->exists() ) { - $valueMsg = new RawMessage( '$1' ); - } - if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) { - $limitReport .= Html::openElement( 'tr' ) . - Html::rawElement( 'th', null, $keyMsg->parse() ) . - Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) . - Html::closeElement( 'tr' ); - } - } - } - - $limitReport .= Html::closeElement( 'tbody' ) . - Html::closeElement( 'table' ) . - Html::closeElement( 'div' ); - - return $limitReport; } protected function showStandardInputs( &$tabindex = 2 ) { @@ -3513,13 +3508,12 @@ HTML if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$this, &$wgOut ] ) ) { $stats = $wgOut->getContext()->getStats(); $stats->increment( 'edit.failures.conflict' ); - if ( $this->mTitle->isTalkPage() ) { - $stats->increment( 'edit.failures.conflict.byType.talk' ); - } else { - $stats->increment( 'edit.failures.conflict.byType.subject' ); - } - if ( $this->mTitle->getNamespace() === NS_PROJECT ) { - $stats->increment( 'edit.failures.conflict.byNamespace.project' ); + // Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics + if ( + $this->mTitle->getNamespace() >= NS_MAIN && + $this->mTitle->getNamespace() <= NS_CATEGORY_TALK + ) { + $stats->increment( 'edit.failures.conflict.byNamespaceId.' . $this->mTitle->getNamespace() ); } $wgOut->wrapWikiMsg( '

$1

', "yourdiff" ); @@ -4175,11 +4169,9 @@ HTML * @return string */ protected function safeUnicodeOutput( $text ) { - global $wgContLang; - $codedText = $wgContLang->recodeForEdit( $text ); return $this->checkUnicodeCompliantBrowser() - ? $codedText - : $this->makeSafe( $codedText ); + ? $text + : $this->makesafe( $text ); } /** diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 98f8283813..361058b17a 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -203,7 +203,7 @@ class FileDeleteForm { $dbw->endAtomic( __METHOD__ ); } else { // Page deleted but file still there? rollback page delete - $dbw->rollback( __METHOD__ ); + wfGetLBFactory()->rollbackMasterChanges( __METHOD__ ); } } else { // Done; nothing changed diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 66e244082e..7117f4c29a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -222,17 +222,17 @@ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) { * Merge arrays in the style of getUserPermissionsErrors, with duplicate removal * e.g. * wfMergeErrorArrays( - * array( array( 'x' ) ), - * array( array( 'x', '2' ) ), - * array( array( 'x' ) ), - * array( array( 'y' ) ) + * [ [ 'x' ] ], + * [ [ 'x', '2' ] ], + * [ [ 'x' ] ], + * [ [ 'y' ] ] * ); * returns: - * array( - * array( 'x', '2' ), - * array( 'x' ), - * array( 'y' ) - * ) + * [ + * [ 'x', '2' ], + * [ 'x' ], + * [ 'y' ] + * ] * * @param array $array1,... * @return array @@ -827,7 +827,7 @@ function wfParseUrl( $url ) { $bits = parse_url( $url ); MediaWiki\restoreWarnings(); // parse_url() returns an array without scheme for some invalid URLs, e.g. - // parse_url("%0Ahttp://example.com") == array( 'host' => '%0Ahttp', 'path' => 'example.com' ) + // parse_url("%0Ahttp://example.com") == [ 'host' => '%0Ahttp', 'path' => 'example.com' ] if ( !$bits || !isset( $bits['scheme'] ) ) { return false; } @@ -2950,7 +2950,7 @@ function wfRelativePath( $path, $from ) { * Supports base 2 through 36; digit values 10-36 are represented * as lowercase letters a-z. Input is case-insensitive. * - * @deprecated 1.27 Use Wikimedia\base_convert() directly + * @deprecated since 1.27 Use Wikimedia\base_convert() directly * * @param string $input Input number * @param int $sourceBase Base of the input number @@ -3350,9 +3350,9 @@ function wfCountDown( $seconds ) { } /** - * Replace all invalid characters with - - * Additional characters can be defined in $wgIllegalFileChars (see bug 20489) - * By default, $wgIllegalFileChars = ':' + * Replace all invalid characters with '-'. + * Additional characters can be defined in $wgIllegalFileChars (see T22489). + * By default, $wgIllegalFileChars includes ':', '/', '\'. * * @param string $name Filename to process * @return string @@ -3360,12 +3360,13 @@ function wfCountDown( $seconds ) { function wfStripIllegalFilenameChars( $name ) { global $wgIllegalFileChars; $illegalFileChars = $wgIllegalFileChars ? "|[" . $wgIllegalFileChars . "]" : ''; - $name = wfBaseName( $name ); $name = preg_replace( "/[^" . Title::legalChars() . "]" . $illegalFileChars . "/", '-', $name ); + // $wgIllegalFileChars may not include '/' and '\', so we still need to do this + $name = wfBaseName( $name ); return $name; } @@ -3524,7 +3525,7 @@ function wfGetParserCacheStorage() { * @param string|null $deprecatedVersion Optionally mark hook as deprecated with version number * * @return bool True if no handler aborted the hook - * @deprecated 1.25 - use Hooks::run + * @deprecated since 1.25 - use Hooks::run */ function wfRunHooks( $event, array $args = [], $deprecatedVersion = null ) { return Hooks::run( $event, $args, $deprecatedVersion ); diff --git a/includes/Html.php b/includes/Html.php index e5128d166c..7cb75bba91 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -935,13 +935,7 @@ class Html { $attribs['version'] = $wgHtml5Version; } - $html = self::openElement( 'html', $attribs ); - - if ( $html ) { - $html .= "\n"; - } - - $ret .= $html; + $ret .= self::openElement( 'html', $attribs ); return $ret; } @@ -1020,9 +1014,21 @@ class Html { static function srcSet( array $urls ) { $candidates = []; foreach ( $urls as $density => $url ) { - // Cast density to float to strip 'x'. - $candidates[] = $url . ' ' . (float)$density . 'x'; + // Cast density to float to strip 'x', then back to string to serve + // as array index. + $density = (string)(float)$density; + $candidates[$density] = $url; } + + // Remove duplicates that are the same as a smaller value + ksort( $candidates, SORT_NUMERIC ); + $candidates = array_unique( $candidates ); + + // Append density info to the url + foreach ( $candidates as $density => $url ) { + $candidates[$density] = $url . ' ' . $density . 'x'; + } + return implode( ", ", $candidates ); } } diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index b12f49f0b0..54b057aec6 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -124,47 +124,6 @@ class Http { return Http::request( 'POST', $url, $options, $caller ); } - /** - * Check if the URL can be served by localhost - * - * @param string $url Full url to check - * @return bool - */ - public static function isLocalURL( $url ) { - global $wgCommandLineMode, $wgLocalVirtualHosts; - - if ( $wgCommandLineMode ) { - return false; - } - - // Extract host part - $matches = []; - if ( preg_match( '!^http://([\w.-]+)[/:].*$!', $url, $matches ) ) { - $host = $matches[1]; - // Split up dotwise - $domainParts = explode( '.', $host ); - // Check if this domain or any superdomain is listed as a local virtual host - $domainParts = array_reverse( $domainParts ); - - $domain = ''; - $countParts = count( $domainParts ); - for ( $i = 0; $i < $countParts; $i++ ) { - $domainPart = $domainParts[$i]; - if ( $i == 0 ) { - $domain = $domainPart; - } else { - $domain = $domainPart . '.' . $domain; - } - - if ( in_array( $domain, $wgLocalVirtualHosts ) ) { - return true; - } - } - } - - return false; - } - /** * A standard user-agent we can use for external requests. * @return string @@ -194,7 +153,7 @@ class Http { } /** - * Gets the relevant proxy from $wgHTTPProxy/http_proxy (when set). + * Gets the relevant proxy from $wgHTTPProxy * * @return mixed The proxy address or an empty string if not set. */ @@ -205,11 +164,6 @@ class Http { return $wgHTTPProxy; } - $envHttpProxy = getenv( "http_proxy" ); - if ( $envHttpProxy ) { - return $envHttpProxy; - } - return ""; } } @@ -393,15 +347,56 @@ class MWHttpRequest { return; } - // Otherwise, fallback to $wgHTTPProxy/http_proxy (when set) if this is not a machine + // Otherwise, fallback to $wgHTTPProxy if this is not a machine // local URL and proxies are not disabled - if ( Http::isLocalURL( $this->url ) || $this->noProxy ) { + if ( self::isLocalURL( $this->url ) || $this->noProxy ) { $this->proxy = ''; } else { $this->proxy = Http::getProxy(); } } + /** + * Check if the URL can be served by localhost + * + * @param string $url Full url to check + * @return bool + */ + private static function isLocalURL( $url ) { + global $wgCommandLineMode, $wgLocalVirtualHosts; + + if ( $wgCommandLineMode ) { + return false; + } + + // Extract host part + $matches = []; + if ( preg_match( '!^https?://([\w.-]+)[/:].*$!', $url, $matches ) ) { + $host = $matches[1]; + // Split up dotwise + $domainParts = explode( '.', $host ); + // Check if this domain or any superdomain is listed as a local virtual host + $domainParts = array_reverse( $domainParts ); + + $domain = ''; + $countParts = count( $domainParts ); + for ( $i = 0; $i < $countParts; $i++ ) { + $domainPart = $domainParts[$i]; + if ( $i == 0 ) { + $domain = $domainPart; + } else { + $domain = $domainPart . '.' . $domain; + } + + if ( in_array( $domain, $wgLocalVirtualHosts ) ) { + return true; + } + } + } + + return false; + } + /** * Set the user agent * @param string $UA diff --git a/includes/Linker.php b/includes/Linker.php index 0b2d3a71b5..5e540b9c03 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -137,31 +137,24 @@ class Linker { /** * Return the CSS colour of a known link * + * @deprecated since 1.28, use LinkRenderer::getLinkClasses() instead + * * @since 1.16.3 * @param LinkTarget $t * @param int $threshold User defined threshold * @return string CSS class */ public static function getLinkColour( LinkTarget $t, $threshold ) { - $linkCache = MediaWikiServices::getInstance()->getLinkCache(); - // Make sure the target is in the cache - $id = $linkCache->addLinkObj( $t ); - if ( $id == 0 ) { - // Doesn't exist - return ''; - } - - if ( $linkCache->getGoodLinkFieldObj( $t, 'redirect' ) ) { - # Page is a redirect - return 'mw-redirect'; - } elseif ( $threshold > 0 && MWNamespace::isContent( $t->getNamespace() ) - && $linkCache->getGoodLinkFieldObj( $t, 'length' ) < $threshold - ) { - # Page is a stub - return 'stub'; + wfDeprecated( __METHOD__, '1.28' ); + $services = MediaWikiServices::getInstance(); + $linkRenderer = $services->getLinkRenderer(); + if ( $threshold !== $linkRenderer->getStubThreshold() ) { + // Need to create a new instance with the right stub threshold... + $linkRenderer = $services->getLinkRendererFactory()->create(); + $linkRenderer->setStubThreshold( $threshold ); } - return ''; + return $linkRenderer->getLinkClasses( $t ); } /** @@ -177,6 +170,7 @@ class Linker { * link() replaces the old functions in the makeLink() family. * * @since 1.18 Method exists since 1.16 as non-static, made static in 1.18. + * @deprecated since 1.28, use MediaWiki\Linker\LinkRenderer instead * * @param Title $target Can currently only be a Title, but this may * change to support Images, literal URLs, etc. @@ -252,7 +246,9 @@ class Linker { /** * Identical to link(), except $options defaults to 'known'. + * * @since 1.16.3 + * @deprecated since 1.28, use MediaWiki\Linker\LinkRenderer instead * @see Linker::link * @return string */ diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index ff292cfb61..ac5fbe0108 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -11,6 +11,7 @@ use LBFactory; use LinkCache; use Liuggio\StatsdClient\Factory\StatsdDataFactory; use LoadBalancer; +use MediaHandlerFactory; use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkRendererFactory; use MediaWiki\Services\SalvageableService; @@ -511,6 +512,14 @@ class MediaWikiServices extends ServiceContainer { return $this->getService( 'WatchedItemQueryService' ); } + /** + * @since 1.28 + * @return MediaHandlerFactory + */ + public function getMediaHandlerFactory() { + return $this->getService( 'MediaHandlerFactory' ); + } + /** * @since 1.28 * @return GenderCache diff --git a/includes/MovePage.php b/includes/MovePage.php index 708dea1fc9..70b6738773 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -392,11 +392,16 @@ class MovePage { $reason, $nullRevision ]; - $dbw->onTransactionIdle( function () use ( $params, $dbw ) { - // Keep each single hook handler atomic - $dbw->setFlag( DBO_TRX ); // flag is automatically reset by DB layer - Hooks::run( 'TitleMoveComplete', $params ); - } ); + // Keep each single hook handler atomic + DeferredUpdates::addUpdate( + new AtomicSectionUpdate( + $dbw, + __METHOD__, + function () use ( $params ) { + Hooks::run( 'TitleMoveComplete', $params ); + } + ) + ); return Status::newGood(); } diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 15b70c8324..b88db920d0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -23,6 +23,7 @@ use MediaWiki\Logger\LoggerFactory; use MediaWiki\Session\SessionManager; use WrappedString\WrappedString; +use WrappedString\WrappedStringList; /** * This class should be covered by a general architecture document which does @@ -250,11 +251,6 @@ class OutputPage extends ContextSource { */ protected $styles = []; - /** - * Whether jQuery is already handled. - */ - protected $mJQueryDone = false; - private $mIndexPolicy = 'index'; private $mFollowPolicy = 'follow'; private $mVaryHeader = [ @@ -294,6 +290,9 @@ class OutputPage extends ContextSource { */ private $copyrightUrl; + /** @var array Profiling data */ + private $limitReportData = []; + /** * Constructor for OutputPage. This should not be called directly. * Instead a new RequestContext should be created and it will implicitly create @@ -608,29 +607,6 @@ class OutputPage extends ContextSource { $this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules ); } - /** - * Get the list of module messages to include on this page - * - * @deprecated since 1.26 Obsolete - * @param bool $filter - * @param string|null $position - * @return array Array of module names - */ - public function getModuleMessages( $filter = false, $position = null ) { - wfDeprecated( __METHOD__, '1.26' ); - return []; - } - - /** - * Load messages of one or more ResourceLoader modules. - * - * @deprecated since 1.26 Use addModules() instead - * @param string|array $modules Module name (string) or array of module names - */ - public function addModuleMessages( $modules ) { - wfDeprecated( __METHOD__, '1.26' ); - } - /** * @return null|string ResourceLoader target */ @@ -657,7 +633,7 @@ class OutputPage extends ContextSource { } /** - * Add or replace an header item to the output + * Add or replace a head item to the output * * Whenever possible, use more specific options like ResourceLoader modules, * OutputPage::addLink(), OutputPage::addMetaLink() and OutputPage::addFeedLink() @@ -672,6 +648,16 @@ class OutputPage extends ContextSource { $this->mHeadItems[$name] = $value; } + /** + * Add one or more head items to the output + * + * @since 1.28 + * @param string|string[] $value Raw HTML + */ + public function addHeadItems( $values ) { + $this->mHeadItems = array_merge( $this->mHeadItems, (array)$values ); + } + /** * Check if the header item $name is already set * @@ -1781,11 +1767,14 @@ class OutputPage extends ContextSource { } } - // enable OOUI if requested via ParserOutput + // Enable OOUI if requested via ParserOutput if ( $parserOutput->getEnableOOUI() ) { $this->enableOOUI(); } + // Include profiling data + $this->setLimitReportData( $parserOutput->getLimitReportData() ); + // Link flags are ignored for now, but may in the future be // used to mark individual language links. $linkFlags = []; @@ -2633,7 +2622,8 @@ class OutputPage extends ContextSource { $userdir = $this->getLanguage()->getDir(); $sitedir = $wgContLang->getDir(); - $ret = Html::htmlHeader( $sk->getHtmlElementAttributes() ); + $pieces = []; + $pieces[] = Html::htmlHeader( $sk->getHtmlElementAttributes() ); if ( $this->getHTMLTitle() == '' ) { $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->inContentLanguage() ); @@ -2641,8 +2631,7 @@ class OutputPage extends ContextSource { $openHead = Html::openElement( 'head' ); if ( $openHead ) { - # Don't bother with the newline if $head == '' - $ret .= "$openHead\n"; + $pieces[] = $openHead; } if ( !Html::isXmlMimeType( $this->getConfig()->get( 'MimeType' ) ) ) { @@ -2654,25 +2643,25 @@ class OutputPage extends ContextSource { // Our XML declaration is output by Html::htmlHeader. // http://www.whatwg.org/html/semantics.html#attr-meta-http-equiv-content-type // http://www.whatwg.org/html/semantics.html#charset - $ret .= Html::element( 'meta', [ 'charset' => 'UTF-8' ] ) . "\n"; + $pieces[] = Html::element( 'meta', [ 'charset' => 'UTF-8' ] ); } - $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n"; - $ret .= $this->getInlineHeadScripts() . "\n"; - $ret .= $this->buildCssLinks() . "\n"; - $ret .= $this->getExternalHeadScripts() . "\n"; + $pieces[] = Html::element( 'title', null, $this->getHTMLTitle() ); + $pieces[] = $this->getInlineHeadScripts(); + $pieces[] = $this->buildCssLinks(); + $pieces[] = $this->getExternalHeadScripts(); foreach ( $this->getHeadLinksArray() as $item ) { - $ret .= $item . "\n"; + $pieces[] = $item; } foreach ( $this->mHeadItems as $item ) { - $ret .= $item . "\n"; + $pieces[] = $item; } $closeHead = Html::closeElement( 'head' ); if ( $closeHead ) { - $ret .= "$closeHead\n"; + $pieces[] = $closeHead; } $bodyClasses = []; @@ -2687,6 +2676,11 @@ class OutputPage extends ContextSource { $bodyClasses[] = 'capitalize-all-nouns'; } + // Parser feature migration class + // The idea is that this will eventually be removed, after the wikitext + // which requires it is cleaned up. + $bodyClasses[] = 'mw-hide-empty-elt'; + $bodyClasses[] = $sk->getPageClasses( $this->getTitle() ); $bodyClasses[] = 'skin-' . Sanitizer::escapeClass( $sk->getSkinName() ); $bodyClasses[] = @@ -2701,9 +2695,9 @@ class OutputPage extends ContextSource { $sk->addToBodyAttributes( $this, $bodyAttrs ); Hooks::run( 'OutputPageBodyAttributes', [ $this, $sk, &$bodyAttrs ] ); - $ret .= Html::openElement( 'body', $bodyAttrs ) . "\n"; + $pieces[] = Html::openElement( 'body', $bodyAttrs ); - return $ret; + return WrappedStringList::join( "\n", $pieces ); } /** @@ -2784,6 +2778,17 @@ class OutputPage extends ContextSource { continue; } + if ( $only === ResourceLoaderModule::TYPE_STYLES ) { + if ( $module->getType() !== ResourceLoaderModule::LOAD_STYLES ) { + $logger = $resourceLoader->getLogger(); + $logger->debug( 'Unexpected general module "{module}" in styles queue.', [ + 'module' => $name, + ] ); + } else { + $links['states'][$name] = 'ready'; + } + } + $sortedModules[$module->getSource()][$module->getGroup()][$name] = $module; } @@ -2904,7 +2909,7 @@ class OutputPage extends ContextSource { /** * Build html output from an array of links from makeResourceLoaderLink. * @param array $links - * @return string HTML + * @return string|WrappedStringList HTML */ protected static function getHtmlFromLoaderLinks( array $links ) { $html = []; @@ -2920,7 +2925,7 @@ class OutputPage extends ContextSource { // Filter out empty values $html = array_filter( $html, 'strlen' ); - if ( count( $states ) ) { + if ( $states ) { array_unshift( $html, ResourceLoader::makeInlineScript( ResourceLoader::makeLoaderStateScript( $states ) ) ); @@ -2940,25 +2945,23 @@ class OutputPage extends ContextSource { } /** - * tags to put in "". + * Inline "' ) ) ); } + + public function testGetLinkClasses() { + $titleFormatter = MediaWikiServices::getInstance()->getTitleFormatter(); + $linkCache = new LinkCache( $titleFormatter ); + $foobarTitle = new TitleValue( NS_MAIN, 'FooBar' ); + $redirectTitle = new TitleValue( NS_MAIN, 'Redirect' ); + $userTitle = new TitleValue( NS_USER, 'Someuser' ); + $linkCache->addGoodLinkObj( + 1, // id + $foobarTitle, + 10, // len + 0 // redir + ); + $linkCache->addGoodLinkObj( + 2, // id + $redirectTitle, + 10, // len + 1 // redir + ); + + $linkCache->addGoodLinkObj( + 3, // id + $userTitle, + 10, // len + 0 // redir + ); + + $linkRenderer = new LinkRenderer( $titleFormatter, $linkCache ); + $linkRenderer->setStubThreshold( 0 ); + $this->assertEquals( + '', + $linkRenderer->getLinkClasses( $foobarTitle ) + ); + + $linkRenderer->setStubThreshold( 20 ); + $this->assertEquals( + 'stub', + $linkRenderer->getLinkClasses( $foobarTitle ) + ); + + $linkRenderer->setStubThreshold( 0 ); + $this->assertEquals( + 'mw-redirect', + $linkRenderer->getLinkClasses( $redirectTitle ) + ); + + $linkRenderer->setStubThreshold( 20 ); + $this->assertEquals( + '', + $linkRenderer->getLinkClasses( $userTitle ) + ); + } + } diff --git a/tests/phpunit/includes/objectcache/RedisBagOStuffTest.php b/tests/phpunit/includes/objectcache/RedisBagOStuffTest.php index cf87a98098..705a34a68d 100644 --- a/tests/phpunit/includes/objectcache/RedisBagOStuffTest.php +++ b/tests/phpunit/includes/objectcache/RedisBagOStuffTest.php @@ -2,13 +2,16 @@ /** * @group BagOStuff */ -class RedisBagOStuffTest extends MediaWikiTestCase { +class RedisBagOStuffTest extends PHPUnit_Framework_TestCase { /** @var RedisBagOStuff */ private $cache; protected function setUp() { parent::setUp(); - $this->cache = TestingAccessWrapper::newFromObject( new RedisBagOStuff( [ 'servers' => [] ] ) ); + $cache = $this->getMockBuilder( 'RedisBagOStuff' ) + ->disableOriginalConstructor() + ->getMock(); + $this->cache = TestingAccessWrapper::newFromObject( $cache ); } /** diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 8512572a25..e7abd15e8b 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -1,4 +1,7 @@ $handler ) { - $tmpGlobals['wgMediaHandlers'][$type] = 'MockBitmapHandler'; - } - // Vector images have to be handled slightly differently - $tmpGlobals['wgMediaHandlers']['image/svg+xml'] = 'MockSvgHandler'; - - // DjVu images have to be handled slightly differently - $tmpGlobals['wgMediaHandlers']['image/vnd.djvu'] = 'MockDjVuHandler'; - - // Ogg video/audio increasingly more differently - $tmpGlobals['wgMediaHandlers']['application/ogg'] = 'MockOggHandler'; - $tmpHooks = $wgHooks; $tmpHooks['ParserTestParser'][] = 'ParserTestParserHook::setup'; $tmpHooks['ParserGetVariableValueTs'][] = 'ParserTest::getFakeTimestamp'; @@ -163,12 +150,8 @@ class NewParserTest extends MediaWikiTestCase { $this->djVuSupport = new DjVuSupport(); // Tidy support $this->tidySupport = new TidySupport(); - $tmpGlobals['wgTidyConfig'] = null; + $tmpGlobals['wgTidyConfig'] = $this->tidySupport->getConfig(); $tmpGlobals['wgUseTidy'] = false; - $tmpGlobals['wgDebugTidy'] = false; - $tmpGlobals['wgTidyConf'] = $IP . '/includes/tidy/tidy.conf'; - $tmpGlobals['wgTidyOpts'] = ''; - $tmpGlobals['wgTidyInternal'] = $this->tidySupport->isInternal(); $this->setMwGlobals( $tmpGlobals ); @@ -181,6 +164,13 @@ class NewParserTest extends MediaWikiTestCase { MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache $wgContLang->resetNamespaces(); # reset namespace cache ParserTest::resetTitleServices(); + MediaWikiServices::getInstance()->disableService( 'MediaHandlerFactory' ); + MediaWikiServices::getInstance()->redefineService( + 'MediaHandlerFactory', + function() { + return new MockMediaHandlerFactory(); + } + ); } protected function tearDown() { @@ -200,6 +190,7 @@ class NewParserTest extends MediaWikiTestCase { // Restore message cache (temporary pages and $wgUseDatabaseMessages) MessageCache::destroyInstance(); + MediaWikiServices::getInstance()->resetServiceForTesting( 'MediaHandlerFactory' ); parent::tearDown(); @@ -452,7 +443,8 @@ class NewParserTest extends MediaWikiTestCase { 'wgMathDirectory' => $uploadDir . '/math', 'wgDefaultLanguageVariant' => $variant, 'wgLinkHolderBatchSize' => $linkHolderBatchSize, - 'wgUseTidy' => isset( $opts['tidy'] ), + 'wgUseTidy' => false, + 'wgTidyConfig' => isset( $opts['tidy'] ) ? $this->tidySupport->getConfig() : null ]; if ( $config ) { diff --git a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php index 4aa4f41524..1dfcd82226 100644 --- a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php +++ b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php @@ -14,7 +14,7 @@ class CoreVersionCheckerTest extends PHPUnit_Framework_TestCase { public static function provideCheck() { return [ - // array( $wgVersion, constraint, expected ) + // [ $wgVersion, constraint, expected ] [ '1.25alpha', '>= 1.26', false ], [ '1.25.0', '>= 1.26', false ], [ '1.26alpha', '>= 1.26', true ], diff --git a/tests/phpunit/includes/registration/ExtensionProcessorTest.php b/tests/phpunit/includes/registration/ExtensionProcessorTest.php index 0120d79ec5..11995de944 100644 --- a/tests/phpunit/includes/registration/ExtensionProcessorTest.php +++ b/tests/phpunit/includes/registration/ExtensionProcessorTest.php @@ -2,11 +2,12 @@ class ExtensionProcessorTest extends MediaWikiTestCase { - private $dir; + private $dir, $dirname; public function setUp() { parent::setUp(); $this->dir = __DIR__ . '/FooBar/extension.json'; + $this->dirname = dirname( $this->dir ); } /** @@ -108,9 +109,9 @@ class ExtensionProcessorTest extends MediaWikiTestCase { } /** - * @covers ExtensionProcessor::extractConfig + * @covers ExtensionProcessor::extractConfig1 */ - public function testExtractConfig() { + public function testExtractConfig1() { $processor = new ExtensionProcessor; $info = [ 'config' => [ @@ -136,6 +137,35 @@ class ExtensionProcessorTest extends MediaWikiTestCase { $this->assertEquals( 'somevalue', $extracted['globals']['egBar'] ); } + /** + * @covers ExtensionProcessor::extractConfig2 + */ + public function testExtractConfig2() { + $processor = new ExtensionProcessor; + $info = [ + 'config' => [ + 'Bar' => [ 'value' => 'somevalue' ], + 'Foo' => [ 'value' => 10 ], + 'Path' => [ 'value' => 'foo.txt', 'path' => true ], + ], + ] + self::$default; + $info2 = [ + 'config' => [ + 'Bar' => [ 'value' => 'somevalue' ], + ], + 'config_prefix' => 'eg', + 'name' => 'FooBar2', + ]; + $processor->extractInfo( $this->dir, $info, 2 ); + $processor->extractInfo( $this->dir, $info2, 2 ); + $extracted = $processor->getExtractedInfo(); + $this->assertEquals( 'somevalue', $extracted['globals']['wgBar'] ); + $this->assertEquals( 10, $extracted['globals']['wgFoo'] ); + $this->assertEquals( "{$this->dirname}/foo.txt", $extracted['globals']['wgPath'] ); + // Custom prefix: + $this->assertEquals( 'somevalue', $extracted['globals']['egBar'] ); + } + public static function provideExtractExtensionMessagesFiles() { $dir = __DIR__ . '/FooBar/'; return [ @@ -414,6 +444,26 @@ class ExtensionProcessorTest extends MediaWikiTestCase { ] ]; } + + public function testGlobalSettingsDocumentedInSchema() { + global $IP; + $globalSettings = TestingAccessWrapper::newFromClass( + ExtensionProcessor::class )->globalSettings; + + $schema = FormatJson::decode( + file_get_contents( "$IP/docs/extension.schema.json" ), + true + ); + $missing = []; + foreach ( $globalSettings as $global ) { + if ( !isset( $schema['properties'][$global] ) ) { + $missing[] = $global; + } + } + + $this->assertEquals( [], $missing, + "The following global settings are not documented in docs/extension.schema.json" ); + } } /** diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php index 2dec02b89f..2114e0acec 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php @@ -27,6 +27,15 @@ class ResourceLoaderFileModuleTest extends ResourceLoaderTestCase { return [ 'noTemplateModule' => [], + 'deprecatedModule' => $base + [ + 'deprecated' => true, + ], + 'deprecatedTomorrow' => $base + [ + 'deprecated' => [ + 'message' => 'Will be removed tomorrow.' + ], + ], + 'htmlTemplateModule' => $base + [ 'templates' => [ 'templates/template.html', @@ -96,6 +105,34 @@ class ResourceLoaderFileModuleTest extends ResourceLoaderTestCase { $this->assertEquals( $rl->getDependencies(), $expected ); } + public static function providerDeprecatedModules() { + return [ + [ + 'deprecatedModule', + 'mw.log.warn("This page is using the deprecated ResourceLoader module \"deprecatedModule\".");', + ], + [ + 'deprecatedTomorrow', + 'mw.log.warn(' . + '"This page is using the deprecated ResourceLoader module \"deprecatedTomorrow\".\\n' . + "Will be removed tomorrow." . + '");' + ] + ]; + } + + /** + * @dataProvider providerDeprecatedModules + * @covers ResourceLoaderFileModule::getScript + */ + public function testDeprecatedModules( $name, $expected ) { + $modules = self::getModules(); + $rl = new ResourceLoaderFileModule( $modules[$name] ); + $rl->setName( $name ); + $ctx = $this->getResourceLoaderContext( 'en', 'ltr' ); + $this->assertEquals( $rl->getScript( $ctx ), $expected ); + } + /** * @covers ResourceLoaderFileModule::getAllStyleFiles * @covers ResourceLoaderFileModule::getAllSkinStyleFiles diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php index ea775ae43c..9b62b82dee 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php @@ -5,7 +5,7 @@ class ResourceLoaderStartUpModuleTest extends ResourceLoaderTestCase { // Version hash for a blank file module. // Result of ResourceLoader::makeHash(), ResourceLoaderTestModule // and ResourceLoaderFileModule::getDefinitionSummary(). - protected static $blankVersion = '0a56zyi'; + protected static $blankVersion = '09p30q0'; protected static function expandPlaceholders( $text ) { return strtr( $text, [ diff --git a/tests/phpunit/includes/search/SearchEngineTest.php b/tests/phpunit/includes/search/SearchEngineTest.php index f084c6461c..081cb38830 100644 --- a/tests/phpunit/includes/search/SearchEngineTest.php +++ b/tests/phpunit/includes/search/SearchEngineTest.php @@ -185,8 +185,12 @@ class SearchEngineTest extends MediaWikiLangTestCase { ->willReturnCallback( $mockFieldBuilder ); // Not using mock since PHPUnit mocks do not work properly with references in params - $this->mergeMwGlobalArrayValue( 'wgHooks', - [ 'SearchIndexFields' => [ [ $this, 'hookSearchIndexFields', $mockFieldBuilder ] ] ] ); + $this->setTemporaryHook( 'SearchIndexFields', + function ( &$fields, SearchEngine $engine ) use ( $mockFieldBuilder ) { + $fields['testField'] = + $mockFieldBuilder( "testField", SearchIndexField::INDEX_TYPE_TEXT ); + return true; + } ); $fields = $mockEngine->getSearchIndexFields(); $this->assertArrayHasKey( 'language', $fields ); @@ -197,9 +201,4 @@ class SearchEngineTest extends MediaWikiLangTestCase { $this->assertArrayHasKey( 'testData', $mapping ); $this->assertEquals( 'test', $mapping['testData'] ); } - - public function hookSearchIndexFields( $mockFieldBuilder, &$fields, SearchEngine $engine ) { - $fields['testField'] = $mockFieldBuilder( "testField", SearchIndexField::INDEX_TYPE_TEXT ); - return true; - } } diff --git a/tests/phpunit/includes/specials/SpecialSearchTest.php b/tests/phpunit/includes/specials/SpecialSearchTest.php index 4ea9686680..3fa8a9f8ed 100644 --- a/tests/phpunit/includes/specials/SpecialSearchTest.php +++ b/tests/phpunit/includes/specials/SpecialSearchTest.php @@ -29,10 +29,10 @@ class SpecialSearchTest extends MediaWikiTestCase { $this->newUserWithSearchNS( $userOptions ) ); /* - $context->setRequest( new FauxRequest( array( + $context->setRequest( new FauxRequest( [ 'ns5'=>true, 'ns6'=>true, - ) )); + ] )); */ $context->setRequest( new FauxRequest( $requested ) ); $search = new SpecialSearch(); diff --git a/tests/phpunit/includes/tidy/BalancerTest.php b/tests/phpunit/includes/tidy/BalancerTest.php new file mode 100644 index 0000000000..f69ecafd5c --- /dev/null +++ b/tests/phpunit/includes/tidy/BalancerTest.php @@ -0,0 +1,155 @@ +balancer = new MediaWiki\Tidy\Balancer( [ + 'strict' => false, /* not strict */ + 'allowedHtmlElements' => null, /* no sanitization */ + 'tidyCompat' => false, /* standard parser */ + 'allowComments' => true, /* comment parsing */ + ] ); + } + + /** + * @covers MediaWiki\Tidy\Balancer::balance + * @dataProvider provideBalancerTests + */ + public function testBalancer( $description, $input, $expected ) { + $output = $this->balancer->balance( $input ); + + // Ignore self-closing tags + $output = preg_replace( '/\s*\/>/', '>', $output ); + + $this->assertEquals( $expected, $output, $description ); + } + + public static function provideBalancerTests() { + // Get the tests from html5lib-tests.json + $json = json_decode( file_get_contents( + __DIR__ . '/html5lib-tests.json' + ), true ); + // Munge this slightly into the format phpunit expects + // for providers, and filter out HTML constructs which + // the balancer doesn't support. + $tests = []; + $okre = "~ \A + (?i:)? + + .* + + \z ~xs"; + foreach ( $json as $filename => $cases ) { + foreach ( $cases as $case ) { + $html = $case['document']['html']; + if ( !preg_match( $okre, $html ) ) { + // Skip tests which involve stuff in the or + // weird doctypes. + continue; + } + // We used to do this: + // $html = substr( $html, strlen( $start ), -strlen( $end ) ); + // But now we use a different field in the test case, + // which reports how domino would parse this case in a + // no-quirks context. (The original test case may + // have had a different context, or relied on quirks mode.) + $html = $case['document']['noQuirksBodyHtml']; + // Normalize case of SVG attributes. + $html = str_replace( 'foreignObject', 'foreignobject', $html ); + // Normalize case of MathML attributes. + $html = str_replace( 'definitionURL', 'definitionurl', $html ); + + if ( + isset( $case['document']['props']['comment'] ) && + preg_match( ',BAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": " BAR " + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,15): unexpected-bang-after-double-dash-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": " BAR " + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOO", + "noQuirksBodyHtml": "FOO" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,15): unexpected-char-in-comment", + "(1,24): unexpected-char-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": " BAR -- -- MUX " + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,15): unexpected-char-in-comment", + "(1,24): unexpected-char-in-comment", + "(1,31): unexpected-bang-after-double-dash-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": " BAR -- -- MUX " + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOO", + "noQuirksBodyHtml": "FOO" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": "" + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,9): incorrect-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": "" + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,8): incorrect-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": "" + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "Hi", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,22): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?xml version=\"1.0\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hi" + } + ] + } + ] + } + ], + "html": "Hi", + "noQuirksBodyHtml": "Hi" + } + }, + { + "data": "", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,20): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?xml version=\"1.0\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "FOOBAZ", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,10): unexpected-dash-after-double-dash-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "comment": "-" + }, + { + "text": "BAZ" + } + ] + } + ] + } + ], + "html": "FOOBAZ", + "noQuirksBodyHtml": "FOOBAZ" + } + }, + { + "data": "Comment before head", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "comment": " comment " + }, + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "Comment before head" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "Comment before head", + "noQuirksBodyHtml": "Comment before head" + } + } + ], + "doctype01.dat": [ + { + "data": "Hello", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,9): need-space-after-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,9): need-space-after-doctype", + "(1,10): expected-doctype-name-but-got-right-bracket", + "(1,10): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,11): expected-doctype-name-but-got-right-bracket", + "(1,11): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,17): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,18): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,17): expected-space-or-right-bracket-in-doctype", + "(1,22): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,17): expected-space-or-right-bracket-in-doctype", + "(1,27): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,24): unexpected-char-in-doctype", + "(1,24): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,28): unexpected-char-in-doctype", + "(1,28): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,34): unexpected-char-in-doctype", + "(1,37): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,25): unexpected-char-in-doctype", + "(1,31): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,32): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"\" \"taco\"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,31): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"\" \"taco\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,33): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"\" \"tai'co\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,24): unexpected-char-in-doctype", + "(1,34): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,17): expected-space-or-right-bracket-in-doctype", + "(1,35): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,24): unexpected-end-of-doctype", + "(1,24): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,25): unexpected-end-of-doctype", + "(1,25): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,24): unexpected-char-in-doctype", + "(1,28): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,25): unexpected-char-in-doctype", + "(1,29): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,32): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"go'of\" \"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,29): unexpected-char-in-doctype", + "(1,32): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"go\" \"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,38): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"go:hh of\" \"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,38): unexpected-char-in-doctype", + "(1,48): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "potato \"W3C-//dfdf\" \"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "Hello", + "errors": [ + "(1,14): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "..." + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ], + "html": "Hello", + "noQuirksBodyHtml": "Hello" + } + }, + { + "data": "", + "errors": [ + "(2,58): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(2,54): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "\n]>", + "errors": [ + "(1,23): expected-space-or-right-bracket-in-doctype", + "(2,30): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "root-element" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "]>", + "escaped": true + } + ] + } + ] + } + ], + "html": "]>", + "noQuirksBodyHtml": "\n]>" + } + }, + { + "data": "", + "errors": [ + "(3,53): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "Mine!", + "errors": [ + "(1,63): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"\" \"http://www.w3.org/DTD/HTML4-strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "Mine!" + } + ] + } + ] + } + ] + } + ], + "html": "Mine!", + "noQuirksBodyHtml": "Mine!" + } + }, + { + "data": "", + "errors": [ + "(1,50): unexpected-char-in-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,50): unexpected-char-in-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,21): unexpected-char-in-doctype", + "(1,49): unexpected-char-in-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,21): unexpected-char-in-doctype", + "(1,49): unexpected-char-in-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + } + ], + "domjs-unsafe.dat": [ + { + "data": "foo\nbar", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(2,6): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo\nbar" + } + ] + } + ] + } + ] + } + ], + "html": "foo\nbar", + "noQuirksBodyHtml": "foo\nbar" + } + }, + { + "data": "foo\rbar", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(2,6): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo\nbar" + } + ] + } + ] + } + ] + } + ], + "html": "foo\nbar", + "noQuirksBodyHtml": "foo\nbar" + } + }, + { + "data": "foo\r\nbar", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(2,6): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo\nbar" + } + ] + } + ] + } + ] + } + ], + "html": "foo\nbar", + "noQuirksBodyHtml": "foo\nbar" + } + }, + { + "data": "", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,12): invalid-codepoint" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "a='�'", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag", + "(1,25): invalid-codepoint" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "data" + } + ], + "children": [ + { + "text": "", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "comment": "test" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,23): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "foo
", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,32): foster-parenting-character-in-table", + "(1,32): foster-parenting-character-in-table", + "(1,32): foster-parenting-character-in-table", + "(1,32): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "foo" + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "foo
", + "noQuirksBodyHtml": "foo
" + } + }, + { + "data": "", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "comment": "test" + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,16): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,27): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,36): unexpected-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,41): unexpected-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,20): unexpected-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "font", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "font", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "id", + "value": "foo" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,18): unexpected-html-element-in-foreign-content", + "(1,31): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): unexpected-html-element-in-foreign-content", + "(1,34): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "font", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "font", + "value": "sans" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + } + ], + "entities01.dat": [ + { + "data": "FOO>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO>BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO>BAR", + "noQuirksBodyHtml": "FOO>BAR" + } + }, + { + "data": "FOO>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,6): named-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO>BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO>BAR", + "noQuirksBodyHtml": "FOO>BAR" + } + }, + { + "data": "FOO> BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,6): named-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO> BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO> BAR", + "noQuirksBodyHtml": "FOO> BAR" + } + }, + { + "data": "FOO>;;BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO>;;BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO>;;BAR", + "noQuirksBodyHtml": "FOO>;;BAR" + } + }, + { + "data": "I'm ¬it; I tell you", + "errors": [ + "(1,4): expected-doctype-but-got-chars", + "(1,9): named-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "I'm ¬it; I tell you" + } + ] + } + ] + } + ], + "html": "I'm ¬it; I tell you", + "noQuirksBodyHtml": "I'm ¬it; I tell you" + } + }, + { + "data": "I'm ∉ I tell you", + "errors": [ + "(1,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "I'm ∉ I tell you" + } + ] + } + ] + } + ], + "html": "I'm ∉ I tell you", + "noQuirksBodyHtml": "I'm ∉ I tell you" + } + }, + { + "data": "FOO& BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO& BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO& BAR", + "noQuirksBodyHtml": "FOO& BAR" + } + }, + { + "data": "FOO&", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,9): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "bar": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&", + "escaped": true + }, + { + "tag": "bar" + } + ] + } + ] + } + ], + "html": "FOO&", + "noQuirksBodyHtml": "FOO&" + } + }, + { + "data": "FOO&&&>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&&&>BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO&&&>BAR", + "noQuirksBodyHtml": "FOO&&&>BAR" + } + }, + { + "data": "FOO)BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO)BAR" + } + ] + } + ] + } + ], + "html": "FOO)BAR", + "noQuirksBodyHtml": "FOO)BAR" + } + }, + { + "data": "FOOABAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOABAR" + } + ] + } + ] + } + ], + "html": "FOOABAR", + "noQuirksBodyHtml": "FOOABAR" + } + }, + { + "data": "FOOABAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOABAR" + } + ] + } + ] + } + ], + "html": "FOOABAR", + "noQuirksBodyHtml": "FOOABAR" + } + }, + { + "data": "FOO&#BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,5): expected-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&#BAR", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO&#BAR", + "noQuirksBodyHtml": "FOO&#BAR" + } + }, + { + "data": "FOO&#ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,5): expected-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&#ZOO", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO&#ZOO", + "noQuirksBodyHtml": "FOO&#ZOO" + } + }, + { + "data": "FOOºR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,7): expected-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOºR" + } + ] + } + ] + } + ], + "html": "FOOºR", + "noQuirksBodyHtml": "FOOºR" + } + }, + { + "data": "FOO&#xZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,6): expected-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&#xZOO", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO&#xZOO", + "noQuirksBodyHtml": "FOO&#xZOO" + } + }, + { + "data": "FOO&#XZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,6): expected-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO&#XZOO", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO&#XZOO", + "noQuirksBodyHtml": "FOO&#XZOO" + } + }, + { + "data": "FOO)BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,7): numeric-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO)BAR" + } + ] + } + ] + } + ], + "html": "FOO)BAR", + "noQuirksBodyHtml": "FOO)BAR" + } + }, + { + "data": "FOO䆺R", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,10): numeric-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO䆺R" + } + ] + } + ] + } + ], + "html": "FOO䆺R", + "noQuirksBodyHtml": "FOO䆺R" + } + }, + { + "data": "FOOAZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,8): numeric-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOAZOO" + } + ] + } + ] + } + ], + "html": "FOOAZOO", + "noQuirksBodyHtml": "FOOAZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOOxZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOxZOO" + } + ] + } + ] + } + ], + "html": "FOOxZOO", + "noQuirksBodyHtml": "FOOxZOO" + } + }, + { + "data": "FOOyZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOyZOO" + } + ] + } + ] + } + ], + "html": "FOOyZOO", + "noQuirksBodyHtml": "FOOyZOO" + } + }, + { + "data": "FOO€ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO€ZOO" + } + ] + } + ] + } + ], + "html": "FOO€ZOO", + "noQuirksBodyHtml": "FOO€ZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOO‚ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO‚ZOO" + } + ] + } + ] + } + ], + "html": "FOO‚ZOO", + "noQuirksBodyHtml": "FOO‚ZOO" + } + }, + { + "data": "FOOƒZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOƒZOO" + } + ] + } + ] + } + ], + "html": "FOOƒZOO", + "noQuirksBodyHtml": "FOOƒZOO" + } + }, + { + "data": "FOO„ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO„ZOO" + } + ] + } + ] + } + ], + "html": "FOO„ZOO", + "noQuirksBodyHtml": "FOO„ZOO" + } + }, + { + "data": "FOO…ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO…ZOO" + } + ] + } + ] + } + ], + "html": "FOO…ZOO", + "noQuirksBodyHtml": "FOO…ZOO" + } + }, + { + "data": "FOO†ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO†ZOO" + } + ] + } + ] + } + ], + "html": "FOO†ZOO", + "noQuirksBodyHtml": "FOO†ZOO" + } + }, + { + "data": "FOO‡ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO‡ZOO" + } + ] + } + ] + } + ], + "html": "FOO‡ZOO", + "noQuirksBodyHtml": "FOO‡ZOO" + } + }, + { + "data": "FOOˆZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOˆZOO" + } + ] + } + ] + } + ], + "html": "FOOˆZOO", + "noQuirksBodyHtml": "FOOˆZOO" + } + }, + { + "data": "FOO‰ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO‰ZOO" + } + ] + } + ] + } + ], + "html": "FOO‰ZOO", + "noQuirksBodyHtml": "FOO‰ZOO" + } + }, + { + "data": "FOOŠZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOÅ ZOO" + } + ] + } + ] + } + ], + "html": "FOOÅ ZOO", + "noQuirksBodyHtml": "FOOÅ ZOO" + } + }, + { + "data": "FOO‹ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO‹ZOO" + } + ] + } + ] + } + ], + "html": "FOO‹ZOO", + "noQuirksBodyHtml": "FOO‹ZOO" + } + }, + { + "data": "FOOŒZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOŒZOO" + } + ] + } + ] + } + ], + "html": "FOOŒZOO", + "noQuirksBodyHtml": "FOOŒZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOOŽZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOŽZOO" + } + ] + } + ] + } + ], + "html": "FOOŽZOO", + "noQuirksBodyHtml": "FOOŽZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOO‘ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO‘ZOO" + } + ] + } + ] + } + ], + "html": "FOO‘ZOO", + "noQuirksBodyHtml": "FOO‘ZOO" + } + }, + { + "data": "FOO’ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO’ZOO" + } + ] + } + ] + } + ], + "html": "FOO’ZOO", + "noQuirksBodyHtml": "FOO’ZOO" + } + }, + { + "data": "FOO“ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO“ZOO" + } + ] + } + ] + } + ], + "html": "FOO“ZOO", + "noQuirksBodyHtml": "FOO“ZOO" + } + }, + { + "data": "FOO”ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO”ZOO" + } + ] + } + ] + } + ], + "html": "FOO”ZOO", + "noQuirksBodyHtml": "FOO”ZOO" + } + }, + { + "data": "FOO•ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO•ZOO" + } + ] + } + ] + } + ], + "html": "FOO•ZOO", + "noQuirksBodyHtml": "FOO•ZOO" + } + }, + { + "data": "FOO–ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO–ZOO" + } + ] + } + ] + } + ], + "html": "FOO–ZOO", + "noQuirksBodyHtml": "FOO–ZOO" + } + }, + { + "data": "FOO—ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO—ZOO" + } + ] + } + ] + } + ], + "html": "FOO—ZOO", + "noQuirksBodyHtml": "FOO—ZOO" + } + }, + { + "data": "FOO˜ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO˜ZOO" + } + ] + } + ] + } + ], + "html": "FOO˜ZOO", + "noQuirksBodyHtml": "FOO˜ZOO" + } + }, + { + "data": "FOO™ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO™ZOO" + } + ] + } + ] + } + ], + "html": "FOO™ZOO", + "noQuirksBodyHtml": "FOO™ZOO" + } + }, + { + "data": "FOOšZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOÅ¡ZOO" + } + ] + } + ] + } + ], + "html": "FOOÅ¡ZOO", + "noQuirksBodyHtml": "FOOÅ¡ZOO" + } + }, + { + "data": "FOO›ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO›ZOO" + } + ] + } + ] + } + ], + "html": "FOO›ZOO", + "noQuirksBodyHtml": "FOO›ZOO" + } + }, + { + "data": "FOOœZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOœZOO" + } + ] + } + ] + } + ], + "html": "FOOœZOO", + "noQuirksBodyHtml": "FOOœZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOOžZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOžZOO" + } + ] + } + ] + } + ], + "html": "FOOžZOO", + "noQuirksBodyHtml": "FOOžZOO" + } + }, + { + "data": "FOOŸZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOŸZOO" + } + ] + } + ] + } + ], + "html": "FOOŸZOO", + "noQuirksBodyHtml": "FOOŸZOO" + } + }, + { + "data": "FOO ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO ZOO", + "escaped": true + } + ] + } + ] + } + ], + "html": "FOO ZOO", + "noQuirksBodyHtml": "FOO ZOO" + } + }, + { + "data": "FOO퟿ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO퟿ZOO" + } + ] + } + ] + } + ], + "html": "FOO퟿ZOO", + "noQuirksBodyHtml": "FOO퟿ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOOZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOZOO" + } + ] + } + ] + } + ], + "html": "FOOZOO", + "noQuirksBodyHtml": "FOOZOO" + } + }, + { + "data": "FOO􏿾ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOô¿¾ZOO" + } + ] + } + ] + } + ], + "html": "FOOô¿¾ZOO", + "noQuirksBodyHtml": "FOOô¿¾ZOO" + } + }, + { + "data": "FOO􈟔ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOôˆŸ”ZOO" + } + ] + } + ] + } + ], + "html": "FOOôˆŸ”ZOO", + "noQuirksBodyHtml": "FOOôˆŸ”ZOO" + } + }, + { + "data": "FOO􏿿ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOOô¿¿ZOO" + } + ] + } + ] + } + ], + "html": "FOOô¿¿ZOO", + "noQuirksBodyHtml": "FOOô¿¿ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity", + "(1,13): eof-in-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�" + } + ] + } + ] + } + ], + "html": "FOO�", + "noQuirksBodyHtml": "FOO�" + } + }, + { + "data": "FOO�", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity", + "(1,13): eof-in-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�" + } + ] + } + ] + } + ], + "html": "FOO�", + "noQuirksBodyHtml": "FOO�" + } + }, + { + "data": "FOO�", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity", + "(1,13): eof-in-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�" + } + ] + } + ] + } + ], + "html": "FOO�", + "noQuirksBodyHtml": "FOO�" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + }, + { + "data": "FOO�ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,13): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO�ZOO" + } + ] + } + ] + } + ], + "html": "FOO�ZOO", + "noQuirksBodyHtml": "FOO�ZOO" + } + } + ], + "entities02.dat": [ + { + "data": "
", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>YY" + } + ] + } + ] + } + ] + } + ], + "html": "
YY\">
", + "noQuirksBodyHtml": "
YY\">
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ&", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ&", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,13): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ&", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): named-entity-without-semicolon", + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>=YY", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>0YY", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>9YY", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>aYY", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>ZYY", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): named-entity-without-semicolon", + "(1,20): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ> YY" + } + ] + } + ] + } + ] + } + ], + "html": "
YY\">
", + "noQuirksBodyHtml": "
YY\">
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): named-entity-without-semicolon", + "(1,17): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>" + } + ] + } + ] + } + ] + } + ], + "html": "
\">
", + "noQuirksBodyHtml": "
\">
" + } + }, + { + "data": "
", + "errors": [ + "(1,15): named-entity-without-semicolon", + "(1,17): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>" + } + ] + } + ] + } + ] + } + ], + "html": "
\">
", + "noQuirksBodyHtml": "
\">
" + } + }, + { + "data": "
", + "errors": [ + "(1,14): named-entity-without-semicolon", + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ>" + } + ] + } + ] + } + ] + } + ], + "html": "
\">
", + "noQuirksBodyHtml": "
\">
" + } + }, + { + "data": "
", + "errors": [ + "(1,18): named-entity-without-semicolon", + "(1,26): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ£_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,25): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ&prod_id=23", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,27): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ£_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,26): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ∏_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,18): named-entity-without-semicolon", + "(1,23): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ£=23", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "(1,22): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "bar", + "value": "ZZ&prod=23", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
ZZ£_id=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,13): named-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ£_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ£_id=23
", + "noQuirksBodyHtml": "
ZZ£_id=23
" + } + }, + { + "data": "
ZZ&prod_id=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ&prod_id=23", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ&prod_id=23
", + "noQuirksBodyHtml": "
ZZ&prod_id=23
" + } + }, + { + "data": "
ZZ£_id=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ£_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ£_id=23
", + "noQuirksBodyHtml": "
ZZ£_id=23
" + } + }, + { + "data": "
ZZ∏_id=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ∏_id=23" + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ∏_id=23
", + "noQuirksBodyHtml": "
ZZ∏_id=23
" + } + }, + { + "data": "
ZZ£=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,13): named-entity-without-semicolon" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ£=23" + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ£=23
", + "noQuirksBodyHtml": "
ZZ£=23
" + } + }, + { + "data": "
ZZ&prod=23
", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZ&prod=23", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "
ZZ&prod=23
", + "noQuirksBodyHtml": "
ZZ&prod=23
" + } + }, + { + "data": "
ZZÆ=
", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "ZZÆ=" + } + ] + } + ] + } + ] + } + ], + "html": "
ZZÆ=
", + "noQuirksBodyHtml": "
ZZÆ=
" + } + } + ], + "foreign-fragment.dat": [ + { + "data": "X", + "errors": [ + "6: HTML start tag “nobr” in a foreign namespace context.", + "7: End of file seen and there were open elements.", + "6: Unclosed element “nobr”." + ], + "fragment": { + "name": "path", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg nobr": true + } + }, + "tree": [ + { + "tag": "nobr", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "12: HTML start tag “font” in a foreign namespace context." + ], + "fragment": { + "name": "path", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg font": true + } + }, + "tree": [ + { + "tag": "font", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "color", + "value": "" + } + ] + }, + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [], + "fragment": { + "name": "path", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg font": true + } + }, + "tree": [ + { + "tag": "font", + "ns": "http://www.w3.org/2000/svg" + }, + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "10: End tag “path” did not match the name of the current open element (“g”).", + "11: End of file seen and there were open elements.", + "3: Unclosed element “g”." + ], + "fragment": { + "name": "path", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg g": true + } + }, + "tree": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “path”." + ], + "fragment": { + "name": "path", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “foreignobject”." + ], + "fragment": { + "name": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “desc”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “title”." + ], + "fragment": { + "name": "title", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “svg”." + ], + "fragment": { + "name": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “mfenced”." + ], + "fragment": { + "name": "mfenced", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “malignmark”." + ], + "fragment": { + "name": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “math”." + ], + "fragment": { + "name": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “annotation-xml”." + ], + "fragment": { + "name": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “mtext”." + ], + "fragment": { + "name": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “mi”." + ], + "fragment": { + "name": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “mo”." + ], + "fragment": { + "name": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “mn”." + ], + "fragment": { + "name": "mn", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "5: Stray end tag “ms”." + ], + "fragment": { + "name": "ms", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "X", + "errors": [ + "51: Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.", + "52: End of file seen and there were open elements.", + "51: Unclosed element “ms”." + ], + "fragment": { + "name": "ms", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "b": true, + "math mglyph": true, + "i": true, + "math malignmark": true, + "u": true, + "ms": true + } + }, + "tree": [ + { + "tag": "b" + }, + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "i" + }, + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "u" + }, + { + "tag": "ms", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "ms", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math malignmark": true + } + }, + "tree": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "ms", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "ms", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "X", + "errors": [ + "51: Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.", + "52: End of file seen and there were open elements.", + "51: Unclosed element “mn”." + ], + "fragment": { + "name": "mn", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "b": true, + "math mglyph": true, + "i": true, + "math malignmark": true, + "u": true, + "mn": true + } + }, + "tree": [ + { + "tag": "b" + }, + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "i" + }, + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "u" + }, + { + "tag": "mn", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "mn", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math malignmark": true + } + }, + "tree": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mn", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mn", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "X", + "errors": [ + "51: Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.", + "52: End of file seen and there were open elements.", + "51: Unclosed element “mo”." + ], + "fragment": { + "name": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "b": true, + "math mglyph": true, + "i": true, + "math malignmark": true, + "u": true, + "mo": true + } + }, + "tree": [ + { + "tag": "b" + }, + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "i" + }, + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "u" + }, + { + "tag": "mo", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math malignmark": true + } + }, + "tree": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "X", + "errors": [ + "51: Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.", + "52: End of file seen and there were open elements.", + "51: Unclosed element “mi”." + ], + "fragment": { + "name": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "b": true, + "math mglyph": true, + "i": true, + "math malignmark": true, + "u": true, + "mi": true + } + }, + "tree": [ + { + "tag": "b" + }, + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "i" + }, + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "u" + }, + { + "tag": "mi", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math malignmark": true + } + }, + "tree": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "X", + "errors": [ + "51: Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.", + "52: End of file seen and there were open elements.", + "51: Unclosed element “mtext”." + ], + "fragment": { + "name": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "b": true, + "math mglyph": true, + "i": true, + "math malignmark": true, + "u": true, + "mtext": true + } + }, + "tree": [ + { + "tag": "b" + }, + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "i" + }, + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "u" + }, + { + "tag": "mtext", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math malignmark": true + } + }, + "tree": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "", + "noQuirksBodyHtml": "" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "5: HTML start tag “div” in a foreign namespace context." + ], + "fragment": { + "name": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math div": true + } + }, + "tree": [ + { + "tag": "div", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math figure": true + } + }, + "tree": [ + { + "tag": "figure", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [ + "5: HTML start tag “div” in a foreign namespace context." + ], + "fragment": { + "name": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math div": true + } + }, + "tree": [ + { + "tag": "div", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + "document": { + "props": { + "tags": { + "math figure": true + } + }, + "tree": [ + { + "tag": "figure", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "title", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "title", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "

X

", + "errors": [ + "5: HTML start tag “div” in a foreign namespace context.", + "9: HTML start tag “h1” in a foreign namespace context." + ], + "fragment": { + "name": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg div": true, + "svg h1": true + } + }, + "tree": [ + { + "tag": "div", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "h1", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "

X

", + "noQuirksBodyHtml": "

X

" + } + }, + { + "data": "
", + "errors": [ + "5: HTML start tag “div” in a foreign namespace context." + ], + "fragment": { + "name": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "svg div": true + } + }, + "tree": [ + { + "tag": "div", + "ns": "http://www.w3.org/2000/svg" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "
", + "errors": [], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "figure": true + } + }, + "tree": [ + { + "tag": "figure" + } + ], + "html": "
", + "noQuirksBodyHtml": "
" + } + }, + { + "data": "<foo>", + "errors": [ + "16: End of file seen and there were open elements.", + "11: Unclosed element “plaintext”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": { + "plaintext": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "plaintext", + "children": [ + { + "text": "<foo>", + "no_escape": true + } + ] + } + ], + "html": "<plaintext><foo></plaintext>", + "noQuirksBodyHtml": "<plaintext><foo></plaintext>" + } + }, + { + "data": "<frameset>X", + "errors": [ + "6: Stray start tag “frameset”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<head>X", + "errors": [ + "6: Stray start tag “head”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<body>X", + "errors": [ + "6: Stray start tag “body”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<html>X", + "errors": [ + "6: Stray start tag “html”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<html class=\"foo\">X", + "errors": [ + "6: Stray start tag “html”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<body class=\"foo\">X", + "errors": [ + "6: Stray start tag “body”." + ], + "fragment": { + "name": "desc", + "ns": "http://www.w3.org/2000/svg" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "X" + } + ], + "html": "X", + "noQuirksBodyHtml": "X" + } + } + ], + "html5test-com.dat": [ + { + "data": "<div<div>", + "errors": [ + "(1,9): expected-doctype-but-got-start-tag", + "(1,9): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div<div": true + }, + "tagWithLt": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div<div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div<div></div<div></body></html>", + "noQuirksBodyHtml": "<div<div></div<div>" + } + }, + { + "data": "<div foo<bar=''>", + "errors": [ + "(1,9): invalid-character-in-attribute-name", + "(1,16): expected-doctype-but-got-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "attrWithFunnyChar": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "foo<bar", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div foo<bar=\"\"></div></body></html>", + "noQuirksBodyHtml": "<div foo<bar=\"\"></div>" + } + }, + { + "data": "<div foo=`bar`>", + "errors": [ + "(1,10): equals-in-unquoted-attribute-value", + "(1,14): unexpected-character-in-unquoted-attribute-value", + "(1,15): expected-doctype-but-got-start-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "foo", + "value": "`bar`" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div foo=\"`bar`\"></div></body></html>", + "noQuirksBodyHtml": "<div foo=\"`bar`\"></div>" + } + }, + { + "data": "<div \\\"foo=''>", + "errors": [ + "(1,7): invalid-character-in-attribute-name", + "(1,14): expected-doctype-but-got-start-tag", + "(1,14): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "attrWithFunnyChar": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "\\\"foo", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div \\\"foo=\"\"></div></body></html>", + "noQuirksBodyHtml": "<div \\\"foo=\"\"></div>" + } + }, + { + "data": "<a href='\\nbar'></a>", + "errors": [ + "(1,16): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "\\nbar" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a href=\"\\nbar\"></a></body></html>", + "noQuirksBodyHtml": "<a href=\"\\nbar\"></a>" + } + }, + { + "data": "<!DOCTYPE html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "&lang;&rang;", + "errors": [ + "(1,6): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "⟨⟩" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>⟨⟩</body></html>", + "noQuirksBodyHtml": "⟨⟩" + } + }, + { + "data": "&apos;", + "errors": [ + "(1,6): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "'" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>'</body></html>", + "noQuirksBodyHtml": "'" + } + }, + { + "data": "&ImaginaryI;", + "errors": [ + "(1,12): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "ⅈ" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>ⅈ</body></html>", + "noQuirksBodyHtml": "ⅈ" + } + }, + { + "data": "&Kopf;", + "errors": [ + "(1,6): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "𝕂" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>𝕂</body></html>", + "noQuirksBodyHtml": "𝕂" + } + }, + { + "data": "&notinva;", + "errors": [ + "(1,9): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "∉" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>∉</body></html>", + "noQuirksBodyHtml": "∉" + } + }, + { + "data": "<?import namespace=\"foo\" implementation=\"#bar\">", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,47): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?import namespace=\"foo\" implementation=\"#bar\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--?import namespace=\"foo\" implementation=\"#bar\"--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--?import namespace=\"foo\" implementation=\"#bar\"-->" + } + }, + { + "data": "<!--foo--bar-->", + "errors": [ + "(1,10): unexpected-char-in-comment", + "(1,15): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "foo--bar" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--foo--bar--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--foo--bar-->" + } + }, + { + "data": "<![CDATA[x]]>", + "errors": [ + "(1,2): expected-dashes-or-doctype", + "(1,13): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "[CDATA[x]]" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--[CDATA[x]]--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--[CDATA[x]]-->" + } + }, + { + "data": "<textarea><!--</textarea>--></textarea>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,39): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<!--", + "escaped": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>&lt;!--</textarea>--&gt;</body></html>", + "noQuirksBodyHtml": "<textarea>&lt;!--</textarea>--&gt;" + } + }, + { + "data": "<textarea><!--</textarea>-->", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<!--", + "escaped": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>&lt;!--</textarea>--&gt;</body></html>", + "noQuirksBodyHtml": "<textarea>&lt;!--</textarea>--&gt;" + } + }, + { + "data": "<style><!--</style>--></style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,30): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style><!--</style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--</style>--&gt;" + } + }, + { + "data": "<style><!--</style>-->", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style><!--</style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--</style>--&gt;" + } + }, + { + "data": "<ul><li>A </li> <li>B</li></ul>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ul": true, + "li": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li", + "children": [ + { + "text": "A " + } + ] + }, + { + "text": " " + }, + { + "tag": "li", + "children": [ + { + "text": "B" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ul><li>A </li> <li>B</li></ul></body></html>", + "noQuirksBodyHtml": "<ul><li>A </li> <li>B</li></ul>" + } + }, + { + "data": "<table><form><input type=hidden><input></form><div></div></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,13): unexpected-form-in-table", + "(1,32): unexpected-hidden-input-in-table", + "(1,39): unexpected-start-tag-implies-table-voodoo", + "(1,46): unexpected-end-tag-implies-table-voodoo", + "(1,46): unexpected-end-tag", + "(1,51): unexpected-start-tag-implies-table-voodoo", + "(1,57): unexpected-end-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true, + "div": true, + "table": true, + "form": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input" + }, + { + "tag": "div" + }, + { + "tag": "table", + "children": [ + { + "tag": "form" + }, + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidden" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><input><div></div><table><form></form><input type=\"hidden\"></table></body></html>", + "noQuirksBodyHtml": "<input><div></div><table><form></form><input type=\"hidden\"></table>" + } + }, + { + "data": "<i>A<b>B<p></i>C</b>D", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,15): adoption-agency-1.3", + "(1,20): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "A" + }, + { + "tag": "b", + "children": [ + { + "text": "B" + } + ] + } + ] + }, + { + "tag": "b" + }, + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i" + }, + { + "text": "C" + } + ] + }, + { + "text": "D" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><i>A<b>B</b></i><b></b><p><b><i></i>C</b>D</p></body></html>", + "noQuirksBodyHtml": "<i>A<b>B</b></i><b></b><p><b><i></i>C</b>D</p>" + } + }, + { + "data": "<div></div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<svg></svg>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<math></math>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math></math></body></html>", + "noQuirksBodyHtml": "<math></math>" + } + } + ], + "inbody01.dat": [ + { + "data": "<button>1</foo>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,15): unexpected-end-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "button": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "button", + "children": [ + { + "text": "1" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><button>1</button></body></html>", + "noQuirksBodyHtml": "<button>1</button>" + } + }, + { + "data": "<foo>1<p>2</foo>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,16): unexpected-end-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "children": [ + { + "text": "1" + }, + { + "tag": "p", + "children": [ + { + "text": "2" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo>1<p>2</p></foo></body></html>", + "noQuirksBodyHtml": "<foo>1<p>2</p></foo>" + } + }, + { + "data": "<dd>1</foo>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dd": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dd", + "children": [ + { + "text": "1" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><dd>1</dd></body></html>", + "noQuirksBodyHtml": "<dd>1</dd>" + } + }, + { + "data": "<foo>1<dd>2</foo>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): unexpected-end-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true, + "dd": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "children": [ + { + "text": "1" + }, + { + "tag": "dd", + "children": [ + { + "text": "2" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo>1<dd>2</dd></foo></body></html>", + "noQuirksBodyHtml": "<foo>1<dd>2</dd></foo>" + } + } + ], + "isindex.dat": [ + { + "data": "<isindex>", + "errors": [ + "(1,9): expected-doctype-but-got-start-tag", + "(1,9): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form>" + } + }, + { + "data": "<isindex name=\"A\" action=\"B\" prompt=\"C\" foo=\"D\">", + "errors": [ + "(1,48): expected-doctype-but-got-start-tag", + "(1,48): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "attrs": [ + { + "name": "action", + "value": "B" + } + ], + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "C" + }, + { + "tag": "input", + "attrs": [ + { + "name": "foo", + "value": "D" + }, + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><form action=\"B\"><hr><label>C<input name=\"isindex\" foo=\"D\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form action=\"B\"><hr><label>C<input name=\"isindex\" foo=\"D\"></label><hr></form>" + } + }, + { + "data": "<form><isindex>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,15): deprecated-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><form></form></body></html>", + "noQuirksBodyHtml": "<form></form>" + } + } + ], + "main-element.dat": [ + { + "data": "<!doctype html><p>foo<main>bar<p>baz", + "errors": [ + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "main": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "main", + "children": [ + { + "text": "bar" + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p>foo</p><main>bar<p>baz</p></main></body></html>", + "noQuirksBodyHtml": "<p>foo</p><main>bar<p>baz</p></main>" + } + }, + { + "data": "<!doctype html><main><p>foo</main>bar", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "main": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "main", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "foo" + } + ] + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><main><p>foo</p></main>bar</body></html>", + "noQuirksBodyHtml": "<main><p>foo</p></main>bar" + } + }, + { + "data": "<!DOCTYPE html>xxx<svg><x><g><a><main><b>", + "errors": [ + " * (1,42) unexpected HTML-like start tag token in foreign content", + " * (1,42) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg x": true, + "svg g": true, + "svg a": true, + "svg main": true, + "b": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "xxx" + }, + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "x", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "a", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "main", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "b" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>xxx<svg><x><g><a><main></main></a></g></x></svg><b></b></body></html>", + "noQuirksBodyHtml": "xxx<svg><x><g><a><main><b></b></main></a></g></x></svg>" + } + } + ], + "math.dat": [ + { + "data": "<math><tr><td><mo><tr>", + "errors": [], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tr": true, + "math td": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tr", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "td", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<math><tr><td><mo></mo></td></tr></math>", + "noQuirksBodyHtml": "<math><tr><td><mo></mo></td></tr></math>" + } + }, + { + "data": "<math><tr><td><mo><tr>", + "errors": [], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tr": true, + "math td": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tr", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "td", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<math><tr><td><mo></mo></td></tr></math>", + "noQuirksBodyHtml": "<math><tr><td><mo></mo></td></tr></math>" + } + }, + { + "data": "<math><thead><mo><tbody>", + "errors": [], + "fragment": { + "name": "thead" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math thead": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "thead", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><thead><mo></mo></thead></math>", + "noQuirksBodyHtml": "<math><thead><mo></mo></thead></math>" + } + }, + { + "data": "<math><tfoot><mo><tbody>", + "errors": [], + "fragment": { + "name": "tfoot" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tfoot": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tfoot", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><tfoot><mo></mo></tfoot></math>", + "noQuirksBodyHtml": "<math><tfoot><mo></mo></tfoot></math>" + } + }, + { + "data": "<math><tbody><mo><tfoot>", + "errors": [], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tbody": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tbody", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><tbody><mo></mo></tbody></math>", + "noQuirksBodyHtml": "<math><tbody><mo></mo></tbody></math>" + } + }, + { + "data": "<math><tbody><mo></table>", + "errors": [], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tbody": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tbody", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><tbody><mo></mo></tbody></math>", + "noQuirksBodyHtml": "<math><tbody><mo></mo></tbody></math>" + } + }, + { + "data": "<math><thead><mo></table>", + "errors": [], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math thead": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "thead", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><thead><mo></mo></thead></math>", + "noQuirksBodyHtml": "<math><thead><mo></mo></thead></math>" + } + }, + { + "data": "<math><tfoot><mo></table>", + "errors": [], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "math math": true, + "math tfoot": true, + "math mo": true + } + }, + "tree": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "tfoot", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<math><tfoot><mo></mo></tfoot></math>", + "noQuirksBodyHtml": "<math><tfoot><mo></mo></tfoot></math>" + } + } + ], + "namespace-sensitivity.dat": [ + { + "data": "<body><table><tr><td><svg><td><foreignObject><span></td>Foo", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg td": true, + "svg foreignObject": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Foo" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "td", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>Foo<table><tbody><tr><td><svg><td><foreignObject><span></span></foreignObject></td></svg></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "Foo<table><tbody><tr><td><svg><td><foreignObject><span></span></foreignObject></td></svg></td></tr></tbody></table>" + } + } + ], + "pending-spec-changes-plain-text-unsafe.dat": [ + { + "data": "<body><table>\u0000filler\u0000text\u0000", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,14): invalid-codepoint", + "(1,14): invalid-codepoint-in-table-text", + "(1,21): invalid-codepoint", + "(1,21): invalid-codepoint-in-table-text", + "(1,26): invalid-codepoint", + "(1,26): invalid-codepoint-in-table-text", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): foster-parenting-character-in-table", + "(1,26): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "fillertext" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>fillertext<table></table></body></html>", + "noQuirksBodyHtml": "fillertext<table></table>" + } + } + ], + "pending-spec-changes.dat": [ + { + "data": "<input type=\"hidden\"><frameset>", + "errors": [ + "(1,21): expected-doctype-but-got-start-tag", + "(1,31): unexpected-start-tag", + "(1,31): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<input type=\"hidden\">" + } + }, + { + "data": "<!DOCTYPE html><table><caption><svg>foo</table>bar", + "errors": [ + "(1,47): unexpected-end-tag", + "(1,47): end-table-tag-in-caption" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><svg>foo</svg></caption></table>bar</body></html>", + "noQuirksBodyHtml": "<table><caption><svg>foo</svg></caption></table>bar" + } + }, + { + "data": "<table><tr><td><svg><desc><td></desc><circle>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,30): unexpected-cell-end-tag", + "(1,37): unexpected-end-tag", + "(1,45): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg desc": true, + "circle": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "td", + "children": [ + { + "tag": "circle" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><svg><desc></desc></svg></td><td><circle></circle></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><desc></desc></svg></td><td><circle></circle></td></tr></tbody></table>" + } + } + ], + "plain-text-unsafe.dat": [ + { + "data": "FOO&#x000D;ZOO", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,11): illegal-codepoint-for-numeric-entity" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO\rZOO" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO\rZOO</body></html>", + "noQuirksBodyHtml": "FOO\rZOO" + } + }, + { + "data": "<html>\u0000<frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,7): invalid-codepoint", + "(1,7): invalid-codepoint-in-body", + "(1,17): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html> \u0000 <frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,8): invalid-codepoint", + "(1,8): invalid-codepoint-in-body", + "(1,19): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<html>a\u0000a<frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,8): invalid-codepoint", + "(1,8): invalid-codepoint-in-body", + "(1,19): unexpected-start-tag", + "(1,30): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "aa" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>aa</body></html>", + "noQuirksBodyHtml": "aa" + } + }, + { + "data": "<html>\u0000\u0000<frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,7): invalid-codepoint", + "(1,7): invalid-codepoint-in-body", + "(1,8): invalid-codepoint", + "(1,8): invalid-codepoint-in-body", + "(1,18): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html>\u0000\n <frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,7): invalid-codepoint", + "(1,7): invalid-codepoint-in-body", + "(2,11): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "\n " + } + }, + { + "data": "<html><select>\u0000", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,15): invalid-codepoint", + "(1,15): invalid-codepoint-in-select", + "(1,15): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "\u0000", + "errors": [ + "(1,1): invalid-codepoint", + "(1,1): expected-doctype-but-got-chars", + "(1,1): invalid-codepoint-in-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body>\u0000", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,7): invalid-codepoint", + "(1,7): invalid-codepoint-in-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<plaintext>\u0000filler\u0000text\u0000", + "errors": [ + "(1,11): expected-doctype-but-got-start-tag", + "(1,12): invalid-codepoint", + "(1,19): invalid-codepoint", + "(1,24): invalid-codepoint", + "(1,24): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "�filler�text�", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><plaintext>�filler�text�</plaintext></body></html>", + "noQuirksBodyHtml": "<plaintext>�filler�text�</plaintext>" + } + }, + { + "data": "<svg><![CDATA[\u0000filler\u0000text\u0000]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,30): invalid-codepoint", + "(1,30): invalid-codepoint", + "(1,30): invalid-codepoint", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "�filler�text�" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>�filler�text�</svg></body></html>", + "noQuirksBodyHtml": "<svg>�filler�text�</svg>" + } + }, + { + "data": "<body><!\u0000>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,8): expected-dashes-or-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "comment": "�" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><!--�--></body></html>", + "noQuirksBodyHtml": "<!--�-->" + } + }, + { + "data": "<body><!\u0000filler\u0000text>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,8): expected-dashes-or-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "comment": "�filler�text" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><!--�filler�text--></body></html>", + "noQuirksBodyHtml": "<!--�filler�text-->" + } + }, + { + "data": "<body><svg><foreignObject>\u0000filler\u0000text", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): invalid-codepoint", + "(1,27): invalid-codepoint-in-body", + "(1,34): invalid-codepoint", + "(1,34): invalid-codepoint-in-body", + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "fillertext" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><foreignObject>fillertext</foreignObject></svg></body></html>", + "noQuirksBodyHtml": "<svg><foreignObject>fillertext</foreignObject></svg>" + } + }, + { + "data": "<svg>\u0000filler\u0000text", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,13): invalid-codepoint", + "(1,13): invalid-codepoint-in-foreign-content", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "�filler�text" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>�filler�text</svg></body></html>", + "noQuirksBodyHtml": "<svg>�filler�text</svg>" + } + }, + { + "data": "<svg>\u0000<frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "�" + }, + { + "tag": "frameset", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>�<frameset></frameset></svg></body></html>", + "noQuirksBodyHtml": "<svg>�<frameset></frameset></svg>" + } + }, + { + "data": "<svg>\u0000 <frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "� " + }, + { + "tag": "frameset", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>� <frameset></frameset></svg></body></html>", + "noQuirksBodyHtml": "<svg>� <frameset></frameset></svg>" + } + }, + { + "data": "<svg>\u0000a<frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "�a" + }, + { + "tag": "frameset", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>�a<frameset></frameset></svg></body></html>", + "noQuirksBodyHtml": "<svg>�a<frameset></frameset></svg>" + } + }, + { + "data": "<svg>\u0000</svg><frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,22): unexpected-start-tag", + "(1,22): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg>�</svg>" + } + }, + { + "data": "<svg>\u0000 </svg><frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,23): unexpected-start-tag", + "(1,23): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg>� </svg>" + } + }, + { + "data": "<svg>\u0000a</svg><frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,6): invalid-codepoint", + "(1,6): invalid-codepoint-in-foreign-content", + "(1,23): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "�a" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>�a</svg></body></html>", + "noQuirksBodyHtml": "<svg>�a</svg>" + } + }, + { + "data": "<svg><path></path></svg><frameset>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,34): unexpected-start-tag", + "(1,34): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg><path></path></svg>" + } + }, + { + "data": "<svg><p><frameset>", + "errors": [ + "(1, 5) expected-doctype-but-got-start-tag", + "(1, 8) unexpected-html-element-in-foreign-content", + "(1, 18) unexpected-start-tag", + "(1, 18) eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg><p><frameset></frameset></p></svg>" + } + }, + { + "data": "<!DOCTYPE html><pre>\r\n\r\nA</pre>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true, + "extraNL": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "\nA", + "extraNL": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>\n\nA</pre></body></html>", + "noQuirksBodyHtml": "<pre>\n\nA</pre>" + } + }, + { + "data": "<!DOCTYPE html><pre>\r\rA</pre>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true, + "extraNL": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "\nA", + "extraNL": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>\n\nA</pre></body></html>", + "noQuirksBodyHtml": "<pre>\n\nA</pre>" + } + }, + { + "data": "<!DOCTYPE html><pre>\rA</pre>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>A</pre></body></html>", + "noQuirksBodyHtml": "<pre>A</pre>" + } + }, + { + "data": "<!DOCTYPE html><table><tr><td><math><mtext>\u0000a", + "errors": [ + "(1,44): invalid-codepoint", + "(1,44): invalid-codepoint-in-body", + "(1,45): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "math math": true, + "math mtext": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><math><mtext>a</mtext></math></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><math><mtext>a</mtext></math></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><table><tr><td><svg><foreignObject>\u0000a", + "errors": [ + "(1,51): invalid-codepoint", + "(1,51): invalid-codepoint-in-body", + "(1,52): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg foreignObject": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><svg><foreignObject>a</foreignObject></svg></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><foreignObject>a</foreignObject></svg></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><math><mi>a\u0000b", + "errors": [ + "(1,27): invalid-codepoint", + "(1,27): invalid-codepoint-in-body", + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "ab" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>ab</mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi>ab</mi></math>" + } + }, + { + "data": "<!DOCTYPE html><math><mo>a\u0000b", + "errors": [ + "(1,27): invalid-codepoint", + "(1,27): invalid-codepoint-in-body", + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mo": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "ab" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mo>ab</mo></math></body></html>", + "noQuirksBodyHtml": "<math><mo>ab</mo></math>" + } + }, + { + "data": "<!DOCTYPE html><math><mn>a\u0000b", + "errors": [ + "(1,27): invalid-codepoint", + "(1,27): invalid-codepoint-in-body", + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mn": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "ab" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mn>ab</mn></math></body></html>", + "noQuirksBodyHtml": "<math><mn>ab</mn></math>" + } + }, + { + "data": "<!DOCTYPE html><math><ms>a\u0000b", + "errors": [ + "(1,27): invalid-codepoint", + "(1,27): invalid-codepoint-in-body", + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math ms": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "ms", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "ab" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><ms>ab</ms></math></body></html>", + "noQuirksBodyHtml": "<math><ms>ab</ms></math>" + } + }, + { + "data": "<!DOCTYPE html><math><mtext>a\u0000b", + "errors": [ + "(1,30): invalid-codepoint", + "(1,30): invalid-codepoint-in-body", + "(1,31): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mtext": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "ab" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mtext>ab</mtext></math></body></html>", + "noQuirksBodyHtml": "<math><mtext>ab</mtext></math>" + } + } + ], + "ruby.dat": [ + { + "data": "<html><ruby>a<rb>b<rb></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rb" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b</rb><rb></rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b</rb><rb></rb></ruby>" + } + }, + { + "data": "<html><ruby>a<rb>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b</rb><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b</rb><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rb>b<rtc></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true, + "rtc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rtc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b</rb><rtc></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b</rb><rtc></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rb>b<rp></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true, + "rp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b</rb><rp></rp></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b</rb><rp></rp></ruby>" + } + }, + { + "data": "<html><ruby>a<rb>b<span></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + }, + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b<span></span></rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b<span></span></rb></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<rb></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true, + "rb": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rb" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b</rt><rb></rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b</rt><rb></rb></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b</rt><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b</rt><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<rtc></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true, + "rtc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rtc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b</rt><rtc></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b</rt><rtc></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<rp></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true, + "rp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b</rt><rp></rp></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b</rt><rp></rp></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<span></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + }, + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b<span></span></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b<span></span></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<rb></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "rb": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rb" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b</rtc><rb></rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b</rtc><rb></rb></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<rt>c<rt>d</ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + }, + { + "tag": "rt", + "children": [ + { + "text": "c" + } + ] + }, + { + "tag": "rt", + "children": [ + { + "text": "d" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b<rt>c</rt><rt>d</rt></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b<rt>c</rt><rt>d</rt></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<rtc></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rtc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b</rtc><rtc></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b</rtc><rtc></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<rp></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "rp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b<rp></rp></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b<rp></rp></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<span></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + }, + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b<span></span></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b<span></span></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<rb></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true, + "rb": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rb" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b</rp><rb></rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b</rp><rb></rb></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b</rp><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b</rp><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<rtc></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true, + "rtc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rtc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b</rp><rtc></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b</rp><rtc></rtc></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<rp></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b</rp><rp></rp></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b</rp><rp></rp></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<span></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + }, + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b<span></span></rp></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b<span></span></rp></ruby>" + } + }, + { + "data": "<html><ruby><rtc><ruby>a<rb>b<rt></ruby></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "rb": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "rtc", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby><rtc><ruby>a<rb>b</rb><rt></rt></ruby></rtc></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><rtc><ruby>a<rb>b</rb><rt></rt></ruby></rtc></ruby>" + } + } + ], + "scriptdata01.dat": [ + { + "data": "FOO<script>'Hello'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'Hello'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'Hello'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'Hello'</script>BAR" + } + }, + { + "data": "FOO<script></script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script" + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script></script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script></script>BAR" + } + }, + { + "data": "FOO<script></script >BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script" + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script></script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script></script>BAR" + } + }, + { + "data": "FOO<script></script/>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,21): self-closing-flag-on-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script" + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script></script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script></script>BAR" + } + }, + { + "data": "FOO<script></script/ >BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,20): unexpected-character-after-solidus-in-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script" + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script></script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script></script>BAR" + } + }, + { + "data": "FOO<script type=\"text/plain\"></scriptx>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,42): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "</scriptx>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\"></scriptx>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\"></scriptx>BAR</script>" + } + }, + { + "data": "FOO<script></script foo=\">\" dd>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,31): attributes-in-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script" + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script></script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script></script>BAR" + } + }, + { + "data": "FOO<script>'<'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<'</script>BAR" + } + }, + { + "data": "FOO<script>'<!'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!'</script>BAR" + } + }, + { + "data": "FOO<script>'<!-'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-'</script>BAR" + } + }, + { + "data": "FOO<script>'<!--'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!--'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!--'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!--'</script>BAR" + } + }, + { + "data": "FOO<script>'<!---'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!---'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!---'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!---'</script>BAR" + } + }, + { + "data": "FOO<script>'<!-->'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-->'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-->'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-->'</script>BAR" + } + }, + { + "data": "FOO<script>'<!-->'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-->'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-->'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-->'</script>BAR" + } + }, + { + "data": "FOO<script>'<!-- potato'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-- potato'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-- potato'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-- potato'</script>BAR" + } + }, + { + "data": "FOO<script>'<!-- <sCrIpt'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-- <sCrIpt'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-- <sCrIpt'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-- <sCrIpt'</script>BAR" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt>'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,56): expected-script-data-but-got-eof", + "(1,56): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt>'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt>'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt>'</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,58): expected-script-data-but-got-eof", + "(1,58): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt> -'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt> -'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -'</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,59): expected-script-data-but-got-eof", + "(1,59): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt> --'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt> --'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --'</script>BAR</script>" + } + }, + { + "data": "FOO<script>'<!-- <sCrIpt> -->'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "'<!-- <sCrIpt> -->'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script>'<!-- <sCrIpt> -->'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script>'<!-- <sCrIpt> -->'</script>BAR" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --!>'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,61): expected-script-data-but-got-eof", + "(1,61): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt> --!>'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt> --!>'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --!>'</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -- >'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,61): expected-script-data-but-got-eof", + "(1,61): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt> -- >'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt> -- >'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -- >'</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt '</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,56): expected-script-data-but-got-eof", + "(1,56): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt '</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt '</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt '</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars", + "(1,56): expected-script-data-but-got-eof", + "(1,56): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt/'</script>BAR", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script></body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt\\'</script>BAR", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt\\'", + "no_escape": true + } + ] + }, + { + "text": "BAR" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt\\'</script>BAR</body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt\\'</script>BAR" + } + }, + { + "data": "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>QUX", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/plain" + } + ], + "children": [ + { + "text": "'<!-- <sCrIpt/'</script>BAR", + "no_escape": true + } + ] + }, + { + "text": "QUX" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>QUX</body></html>", + "noQuirksBodyHtml": "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>QUX" + } + }, + { + "data": "FOO<script><!--<script>-></script>--></script>QUX", + "errors": [ + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "FOO" + }, + { + "tag": "script", + "children": [ + { + "text": "<!--<script>-></script>-->", + "no_escape": true + } + ] + }, + { + "text": "QUX" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>FOO<script><!--<script>-></script>--></script>QUX</body></html>", + "noQuirksBodyHtml": "FOO<script><!--<script>-></script>--></script>QUX" + } + } + ], + "tables01.dat": [ + { + "data": "<table><th>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,11): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "th": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "th" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><th></th></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><th></th></tr></tbody></table>" + } + }, + { + "data": "<table><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,11): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><col foo='bar'>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,22): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "col": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "col", + "attrs": [ + { + "name": "foo", + "value": "bar" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup><col foo=\"bar\"></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup><col foo=\"bar\"></colgroup></table>" + } + }, + { + "data": "<table><colgroup></html>foo", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,24): unexpected-end-tag", + "(1,27): foster-parenting-character-in-table", + "(1,27): foster-parenting-character-in-table", + "(1,27): foster-parenting-character-in-table", + "(1,27): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "foo" + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>foo<table><colgroup></colgroup></table></body></html>", + "noQuirksBodyHtml": "foo<table><colgroup></colgroup></table>" + } + }, + { + "data": "<table></table><p>foo", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table" + }, + { + "tag": "p", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table></table><p>foo</p></body></html>", + "noQuirksBodyHtml": "<table></table><p>foo</p>" + } + }, + { + "data": "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,14): unexpected-end-tag", + "(1,24): unexpected-end-tag", + "(1,30): unexpected-end-tag", + "(1,41): unexpected-end-tag", + "(1,48): unexpected-end-tag", + "(1,56): unexpected-end-tag", + "(1,61): unexpected-end-tag", + "(1,69): unexpected-end-tag", + "(1,74): unexpected-end-tag", + "(1,82): unexpected-end-tag", + "(1,87): unexpected-end-tag", + "(1,91): unexpected-cell-in-table-body", + "(1,91): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><select><option>3</select></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "3" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option>3</option></select><table></table></body></html>", + "noQuirksBodyHtml": "<select><option>3</option></select><table></table>" + } + }, + { + "data": "<table><select><table></table></select></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-implies-table-voodoo", + "(1,22): unexpected-table-element-start-tag-in-select-in-table", + "(1,22): unexpected-start-tag-implies-end-tag", + "(1,39): unexpected-end-tag", + "(1,47): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "table" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select></select><table></table><table></table></body></html>", + "noQuirksBodyHtml": "<select></select><table></table><table></table>" + } + }, + { + "data": "<table><select></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-implies-table-voodoo", + "(1,23): unexpected-table-element-end-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select></select><table></table></body></html>", + "noQuirksBodyHtml": "<select></select><table></table>" + } + }, + { + "data": "<table><select><option>A<tr><td>B</td></tr></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-implies-table-voodoo", + "(1,28): unexpected-table-element-start-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "A" + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "B" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option>A</option></select><table><tbody><tr><td>B</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<select><option>A</option></select><table><tbody><tr><td>B</td></tr></tbody></table>" + } + }, + { + "data": "<table><td></body></caption></col></colgroup></html>foo", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,18): unexpected-end-tag", + "(1,28): unexpected-end-tag", + "(1,34): unexpected-end-tag", + "(1,45): unexpected-end-tag", + "(1,52): unexpected-end-tag", + "(1,55): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>foo</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>foo</td></tr></tbody></table>" + } + }, + { + "data": "<table><td>A</table>B", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "B" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>A</td></tr></tbody></table>B</body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>A</td></tr></tbody></table>B" + } + }, + { + "data": "<table><tr><caption>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "caption": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + }, + { + "tag": "caption" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr></tr></tbody><caption></caption></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr></tr></tbody><caption></caption></table>" + } + }, + { + "data": "<table><tr></body></caption></col></colgroup></html></td></th><td>foo", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,18): unexpected-end-tag-in-table-row", + "(1,28): unexpected-end-tag-in-table-row", + "(1,34): unexpected-end-tag-in-table-row", + "(1,45): unexpected-end-tag-in-table-row", + "(1,52): unexpected-end-tag-in-table-row", + "(1,57): unexpected-end-tag-in-table-row", + "(1,62): unexpected-end-tag-in-table-row", + "(1,69): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>foo</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>foo</td></tr></tbody></table>" + } + }, + { + "data": "<table><td><tr>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,15): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + }, + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr><tr></tr></tbody></table>" + } + }, + { + "data": "<table><td><button><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,23): unexpected-cell-end-tag", + "(1,23): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "button": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "button" + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><button></button></td><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><button></button></td><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><tr><td><svg><desc><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,30): unexpected-cell-end-tag", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg desc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><svg><desc></desc></svg></td><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><desc></desc></svg></td><td></td></tr></tbody></table>" + } + } + ], + "template.dat": [ + { + "data": "<body><template>Hello</template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template>Hello</template></body></html>", + "noQuirksBodyHtml": "<template>Hello</template>" + } + }, + { + "data": "<template>Hello</template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template>Hello</template></head><body></body></html>", + "noQuirksBodyHtml": "<template>Hello</template>" + } + }, + { + "data": "<template></template><div></div>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head><template></template></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<template></template><div></div>" + } + }, + { + "data": "<html><template>Hello</template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template>Hello</template></head><body></body></html>", + "noQuirksBodyHtml": "<template>Hello</template>" + } + }, + { + "data": "<head><template><div></div></template></head>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "div": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><div></div></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><div></div></template>" + } + }, + { + "data": "<div><template><div><span></template><b>", + "errors": [ + " * (1,6) missing DOCTYPE", + " * (1,38) mismatched template end tag", + " * (1,41) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "template": true, + "span": true, + "b": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + }, + { + "tag": "b" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><template><div><span></span></div></template><b></b></div></body></html>", + "noQuirksBodyHtml": "<div><template><div><span></span></div></template><b></b></div>" + } + }, + { + "data": "<div><template></div>Hello", + "errors": [ + " * (1,6) missing DOCTYPE", + " * (1,22) unexpected token in template", + " * (1,27) unexpected end of file in template", + " * (1,27) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><template>Hello</template></div></body></html>", + "noQuirksBodyHtml": "<div><template>Hello</template></div>" + } + }, + { + "data": "<div></template></div>", + "errors": [ + " * (1,6) missing DOCTYPE", + " * (1,17) unexpected template end tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<table><template></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template></template></table></body></html>", + "noQuirksBodyHtml": "<table><template></template></table>" + } + }, + { + "data": "<table><template></template></div>", + "errors": [ + " * (1,8) missing DOCTYPE", + " * (1,35) unexpected token in table - foster parenting", + " * (1,35) unexpected end tag", + " * (1,35) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template></template></table></body></html>", + "noQuirksBodyHtml": "<table><template></template></table>" + } + }, + { + "data": "<table><div><template></template></div>", + "errors": [ + " * (1,8) missing DOCTYPE", + " * (1,13) unexpected token in table - foster parenting", + " * (1,40) unexpected token in table - foster parenting", + " * (1,40) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "template": true, + "table": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><template></template></div><table></table></body></html>", + "noQuirksBodyHtml": "<div><template></template></div><table></table>" + } + }, + { + "data": "<table><template></template><div></div>", + "errors": [ + "no doctype", + "bad div in table", + "bad /div in table", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "table": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + }, + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div><table><template></template></table></body></html>", + "noQuirksBodyHtml": "<div></div><table><template></template></table>" + } + }, + { + "data": "<table> <template></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table> <template></template></table></body></html>", + "noQuirksBodyHtml": "<table> <template></template></table>" + } + }, + { + "data": "<table><tbody><template></template></tbody>", + "errors": [ + "no doctype", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><template></template></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><template></template></tbody></table>" + } + }, + { + "data": "<table><tbody><template></tbody></template>", + "errors": [ + "no doctype", + "bad /tbody", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><template></template></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><template></template></tbody></table>" + } + }, + { + "data": "<table><tbody><template></template></tbody></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><template></template></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><template></template></tbody></table>" + } + }, + { + "data": "<table><thead><template></template></thead>", + "errors": [ + "no doctype", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "thead": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "thead", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><thead><template></template></thead></table></body></html>", + "noQuirksBodyHtml": "<table><thead><template></template></thead></table>" + } + }, + { + "data": "<table><tfoot><template></template></tfoot>", + "errors": [ + "no doctype", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tfoot": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tfoot", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tfoot><template></template></tfoot></table></body></html>", + "noQuirksBodyHtml": "<table><tfoot><template></template></tfoot></table>" + } + }, + { + "data": "<select><template></template></select>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><template></template></select></body></html>", + "noQuirksBodyHtml": "<select><template></template></select>" + } + }, + { + "data": "<select><template><option></option></template></select>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "template": true, + "option": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><template><option></option></template></select></body></html>", + "noQuirksBodyHtml": "<select><template><option></option></template></select>" + } + }, + { + "data": "<template><option></option></select><option></option></template>", + "errors": [ + "no doctype", + "bad /select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "option": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "option" + }, + { + "tag": "option" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><option></option><option></option></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><option></option><option></option></template>" + } + }, + { + "data": "<select><template></template><option></select>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "template": true, + "option": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + }, + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><template></template><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><template></template><option></option></select>" + } + }, + { + "data": "<select><option><template></template></select>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option><template></template></option></select></body></html>", + "noQuirksBodyHtml": "<select><option><template></template></option></select>" + } + }, + { + "data": "<select><template>", + "errors": [ + "no doctype", + "eof in template", + "eof in select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><template></template></select></body></html>", + "noQuirksBodyHtml": "<select><template></template></select>" + } + }, + { + "data": "<select><option></option><template>", + "errors": [ + "no doctype", + "eof in template", + "eof in select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + }, + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option></option><template></template></select></body></html>", + "noQuirksBodyHtml": "<select><option></option><template></template></select>" + } + }, + { + "data": "<select><option></option><template><option>", + "errors": [ + "no doctype", + "eof in template", + "eof in select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + }, + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option></option><template><option></option></template></select></body></html>", + "noQuirksBodyHtml": "<select><option></option><template><option></option></template></select>" + } + }, + { + "data": "<table><thead><template><td></template></table>", + "errors": [ + " * (1,8) missing DOCTYPE" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "thead": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "thead", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><thead><template><td></td></template></thead></table></body></html>", + "noQuirksBodyHtml": "<table><thead><template><td></td></template></thead></table>" + } + }, + { + "data": "<table><template><thead></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "thead": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "thead" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><thead></thead></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><thead></thead></template></table>" + } + }, + { + "data": "<body><table><template><td></tr><div></template></table>", + "errors": [ + "no doctype", + "bad </tr>", + "missing </div>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "td": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><td><div></div></td></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><td><div></div></td></template></table>" + } + }, + { + "data": "<table><template><thead></template></thead></table>", + "errors": [ + "no doctype", + "bad /thead after /template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "thead": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "thead" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><thead></thead></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><thead></thead></template></table>" + } + }, + { + "data": "<table><thead><template><tr></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "thead": true, + "template": true, + "tr": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "thead", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><thead><template><tr></tr></template></thead></table></body></html>", + "noQuirksBodyHtml": "<table><thead><template><tr></tr></template></thead></table>" + } + }, + { + "data": "<table><template><tr></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "tr": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><tr></tr></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><tr></tr></template></table>" + } + }, + { + "data": "<table><tr><template><td>", + "errors": [ + "no doctype", + "eof in template", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><template><td></td></template></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><template><td></td></template></tr></tbody></table>" + } + }, + { + "data": "<table><template><tr><template><td></template></tr></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><tr><template><td></td></template></tr></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><tr><template><td></td></template></tr></template></table>" + } + }, + { + "data": "<table><template><tr><template><td></td></template></tr></template></table>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><tr><template><td></td></template></tr></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><tr><template><td></td></template></tr></template></table>" + } + }, + { + "data": "<table><template><td></template>", + "errors": [ + "no doctype", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><template><td></td></template></table></body></html>", + "noQuirksBodyHtml": "<table><template><td></td></template></table>" + } + }, + { + "data": "<body><template><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td></template>" + } + }, + { + "data": "<body><template><template><tr></tr></template><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><template><tr></tr></template><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><template><tr></tr></template><td></td></template>" + } + }, + { + "data": "<table><colgroup><template><col>", + "errors": [ + "no doctype", + "eof in template", + "eof in table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup><template><col></template></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup><template><col></template></colgroup></table>" + } + }, + { + "data": "<frameset><template><frame></frame></template></frameset>", + "errors": [ + " * (1,11) missing DOCTYPE", + " * (1,21) unexpected start tag token", + " * (1,36) unexpected end tag token", + " * (1,47) unexpected end tag token" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<template></template>" + } + }, + { + "data": "<template><frame></frame></frameset><frame></frame></template>", + "errors": [ + " * (1,11) missing DOCTYPE", + " * (1,18) unexpected start tag", + " * (1,26) unexpected end tag", + " * (1,37) unexpected end tag", + " * (1,44) unexpected start tag", + " * (1,52) unexpected end tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template></template>" + } + }, + { + "data": "<template><div><frameset><span></span></div><span></span></template>", + "errors": [ + "no doctype", + "bad frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "div": true, + "span": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span" + } + ] + }, + { + "tag": "span" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><div><span></span></div><span></span></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><div><span></span></div><span></span></template>" + } + }, + { + "data": "<body><template><div><frameset><span></span></div><span></span></template></body>", + "errors": [ + "no doctype", + "bad frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "div": true, + "span": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span" + } + ] + }, + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><div><span></span></div><span></span></template></body></html>", + "noQuirksBodyHtml": "<template><div><span></span></div><span></span></template>" + } + }, + { + "data": "<body><template><script>var i = 1;</script><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "script": true, + "td": true + }, + "template": true, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "script", + "children": [ + { + "text": "var i = 1;", + "no_escape": true + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><script>var i = 1;</script><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><script>var i = 1;</script><td></td></template>" + } + }, + { + "data": "<body><template><tr><div></div></tr></template>", + "errors": [ + "no doctype", + "foster-parented div", + "foster-parented /div" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><div></div></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><div></div></template>" + } + }, + { + "data": "<body><template><tr></tr><td></td></template>", + "errors": [ + "no doctype", + "unexpected <td>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><tr><td></td></tr></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><tr><td></td></tr></template>" + } + }, + { + "data": "<body><template><td></td></tr><td></td></template>", + "errors": [ + "no doctype", + "bad </tr>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td><td></td></template>" + } + }, + { + "data": "<body><template><td></td><tbody><td></td></template>", + "errors": [ + "no doctype", + "bad <tbody>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td><td></td></template>" + } + }, + { + "data": "<body><template><td></td><caption></caption><td></td></template>", + "errors": [ + " * (1,7) missing DOCTYPE", + " * (1,35) unexpected start tag in table row", + " * (1,45) unexpected end tag in table row" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td><td></td></template>" + } + }, + { + "data": "<body><template><td></td><colgroup></caption><td></td></template>", + "errors": [ + " * (1,7) missing DOCTYPE", + " * (1,36) unexpected start tag in table row", + " * (1,46) unexpected end tag in table row" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td><td></td></template>" + } + }, + { + "data": "<body><template><td></td></table><td></td></template>", + "errors": [ + "no doctype", + "bad </table>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><td></td><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><td></td><td></td></template>" + } + }, + { + "data": "<body><template><tr></tr><tbody><tr></tr></template>", + "errors": [ + "no doctype", + "bad <tbody>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><tr></tr></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><tr></tr></template>" + } + }, + { + "data": "<body><template><tr></tr><caption><tr></tr></template>", + "errors": [ + "no doctype", + "bad <caption>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><tr></tr></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><tr></tr></template>" + } + }, + { + "data": "<body><template><tr></tr></table><tr></tr></template>", + "errors": [ + "no doctype", + "bad </table>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><tr></tr></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><tr></tr></template>" + } + }, + { + "data": "<body><template><thead></thead><caption></caption><tbody></tbody></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "thead": true, + "caption": true, + "tbody": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "thead" + }, + { + "tag": "caption" + }, + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><thead></thead><caption></caption><tbody></tbody></template></body></html>", + "noQuirksBodyHtml": "<template><thead></thead><caption></caption><tbody></tbody></template>" + } + }, + { + "data": "<body><template><thead></thead></table><tbody></tbody></template></body>", + "errors": [ + "no doctype", + "bad </table>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "thead": true, + "tbody": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "thead" + }, + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><thead></thead><tbody></tbody></template></body></html>", + "noQuirksBodyHtml": "<template><thead></thead><tbody></tbody></template>" + } + }, + { + "data": "<body><template><div><tr></tr></div></template>", + "errors": [ + "no doctype", + "bad tr", + "bad /tr" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><div></div></template></body></html>", + "noQuirksBodyHtml": "<template><div></div></template>" + } + }, + { + "data": "<body><template><em>Hello</em></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "em": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "em", + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><em>Hello</em></template></body></html>", + "noQuirksBodyHtml": "<template><em>Hello</em></template>" + } + }, + { + "data": "<body><template><!--comment--></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true + }, + "template": true, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "comment": "comment" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><!--comment--></template></body></html>", + "noQuirksBodyHtml": "<template><!--comment--></template>" + } + }, + { + "data": "<body><template><style></style><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "style": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "style" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><style></style><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><style></style><td></td></template>" + } + }, + { + "data": "<body><template><meta><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "meta": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "meta" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><meta><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><meta><td></td></template>" + } + }, + { + "data": "<body><template><link><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "link": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "link" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><link><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><link><td></td></template>" + } + }, + { + "data": "<body><template><template><tr></tr></template><td></td></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><template><tr></tr></template><td></td></template></body></html>", + "noQuirksBodyHtml": "<template><template><tr></tr></template><td></td></template>" + } + }, + { + "data": "<body><table><colgroup><template><col></col></template></colgroup></table></body>", + "errors": [ + "no doctype", + "bad /col" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup><template><col></template></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup><template><col></template></colgroup></table>" + } + }, + { + "data": "<body a=b><template><div></div><body c=d><div></div></body></template></body>", + "errors": [ + "no doctype", + "bad <body>", + "bad </body>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "a", + "value": "b" + } + ], + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div" + }, + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body a=\"b\"><template><div></div><div></div></template></body></html>", + "noQuirksBodyHtml": "<template><div></div><div></div></template>" + } + }, + { + "data": "<html a=b><template><div><html b=c><span></template>", + "errors": [ + "no doctype", + "bad <html>", + "missing end tags in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "div": true, + "span": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + } + ], + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html a=\"b\"><head><template><div><span></span></div></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><div><span></span></div></template>" + } + }, + { + "data": "<html a=b><template><col></col><html b=c><col></col></template>", + "errors": [ + "no doctype", + "bad /col", + "bad html", + "bad /col" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "col": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + } + ], + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + }, + { + "tag": "col" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html a=\"b\"><head><template><col><col></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><col><col></template>" + } + }, + { + "data": "<html a=b><template><frame></frame><html b=c><frame></frame></template>", + "errors": [ + "no doctype", + "bad frame", + "bad /frame", + "bad html", + "bad frame", + "bad /frame" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + } + ], + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html a=\"b\"><head><template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template></template>" + } + }, + { + "data": "<body><template><tr></tr><template></template><td></td></template>", + "errors": [ + "no doctype", + "unexpected <td>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + }, + { + "tag": "template", + "children": [ + { + "content": true + } + ] + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><tr></tr><template></template><tr><td></td></tr></template></body></html>", + "noQuirksBodyHtml": "<template><tr></tr><template></template><tr><td></td></tr></template>" + } + }, + { + "data": "<body><template><thead></thead><template><tr></tr></template><tr></tr><tfoot></tfoot></template>", + "errors": [ + "no doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "thead": true, + "tr": true, + "tbody": true, + "tfoot": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "thead" + }, + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + }, + { + "tag": "tfoot" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><thead></thead><template><tr></tr></template><tbody><tr></tr></tbody><tfoot></tfoot></template></body></html>", + "noQuirksBodyHtml": "<template><thead></thead><template><tr></tr></template><tbody><tr></tr></tbody><tfoot></tfoot></template>" + } + }, + { + "data": "<body><template><template><b><template></template></template>text</template>", + "errors": [ + "no doctype", + "missing </b>" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "b": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "text" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><template><b><template></template></b></template>text</template></body></html>", + "noQuirksBodyHtml": "<template><template><b><template></template></b></template>text</template>" + } + }, + { + "data": "<body><template><col><colgroup>", + "errors": [ + "no doctype", + "bad colgroup", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><col></colgroup>", + "errors": [ + "no doctype", + "bogus /colgroup", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><col><colgroup></template></body>", + "errors": [ + "no doctype", + "bad colgroup" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><col><div>", + "errors": [ + " * (1,7) missing DOCTYPE", + " * (1,27) unexpected token", + " * (1,27) unexpected end of file in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><col></div>", + "errors": [ + "no doctype", + "bad /div", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><col>Hello", + "errors": [ + "no doctype", + "unexpected text", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "col": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><col></template></body></html>", + "noQuirksBodyHtml": "<template><col></template>" + } + }, + { + "data": "<body><template><i><menu>Foo</i>", + "errors": [ + "no doctype", + "mising /menu", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "i": true, + "menu": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "i" + }, + { + "tag": "menu", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><i></i><menu><i>Foo</i></menu></template></body></html>", + "noQuirksBodyHtml": "<template><i></i><menu><i>Foo</i></menu></template>" + } + }, + { + "data": "<body><template></div><div>Foo</div><template></template><tr></tr>", + "errors": [ + "no doctype", + "bogus /div", + "bogus tr", + "bogus /tr", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true, + "div": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div", + "children": [ + { + "text": "Foo" + } + ] + }, + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template><div>Foo</div><template></template></template></body></html>", + "noQuirksBodyHtml": "<template><div>Foo</div><template></template></template>" + } + }, + { + "data": "<body><div><template></div><tr><td>Foo</td></tr></template>", + "errors": [ + " * (1,7) missing DOCTYPE", + " * (1,28) unexpected token in template", + " * (1,60) unexpected end of file" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "template": true, + "tr": true, + "td": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><template><tr><td>Foo</td></tr></template></div></body></html>", + "noQuirksBodyHtml": "<div><template><tr><td>Foo</td></tr></template></div>" + } + }, + { + "data": "<template></figcaption><sub><table></table>", + "errors": [ + "no doctype", + "bad /figcaption", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "sub": true, + "table": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "sub", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><sub><table></table></sub></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><sub><table></table></sub></template>" + } + }, + { + "data": "<template><template>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template></template></template>" + } + }, + { + "data": "<template><div>", + "errors": [ + "no doctype", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "div": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><div></div></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><div></div></template>" + } + }, + { + "data": "<template><template><div>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "div": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><div></div></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><div></div></template></template>" + } + }, + { + "data": "<template><template><table>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "table": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><table></table></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><table></table></template></template>" + } + }, + { + "data": "<template><template><tbody>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "tbody": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><tbody></tbody></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><tbody></tbody></template></template>" + } + }, + { + "data": "<template><template><tr>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "tr": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><tr></tr></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><tr></tr></template></template>" + } + }, + { + "data": "<template><template><td>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "td": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><td></td></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><td></td></template></template>" + } + }, + { + "data": "<template><template><caption>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "caption": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "caption" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><caption></caption></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><caption></caption></template></template>" + } + }, + { + "data": "<template><template><colgroup>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "colgroup": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><colgroup></colgroup></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><colgroup></colgroup></template></template>" + } + }, + { + "data": "<template><template><col>", + "errors": [ + "no doctype", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "col": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><col></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><col></template></template>" + } + }, + { + "data": "<template><template><tbody><select>", + "errors": [ + " * (1,11) missing DOCTYPE", + " * (1,36) unexpected token in table - foster parenting", + " * (1,36) unexpected end of file in template", + " * (1,36) unexpected end of file in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "tbody": true, + "select": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "tbody" + }, + { + "tag": "select" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><tbody></tbody><select></select></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><tbody></tbody><select></select></template></template>" + } + }, + { + "data": "<template><template><table>Foo", + "errors": [ + "no doctype", + "foster-parenting text F", + "foster-parenting text o", + "foster-parenting text o", + "eof", + "eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "table": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Foo" + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template>Foo<table></table></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template>Foo<table></table></template></template>" + } + }, + { + "data": "<template><template><frame>", + "errors": [ + "no doctype", + "bad tag", + "eof", + "eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template></template></template>" + } + }, + { + "data": "<template><template><script>var i", + "errors": [ + "no doctype", + "eof in script", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "script": true, + "body": true + }, + "template": true, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "script", + "children": [ + { + "text": "var i", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><script>var i</script></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><script>var i</script></template></template>" + } + }, + { + "data": "<template><template><style>var i", + "errors": [ + "no doctype", + "eof in style", + "eof in template", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "style": true, + "body": true + }, + "template": true, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "style", + "children": [ + { + "text": "var i", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><template><style>var i</style></template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><template><style>var i</style></template></template>" + } + }, + { + "data": "<template><table></template><body><span>Foo", + "errors": [ + "no doctype", + "missing /table", + "bad eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "table": true, + "body": true, + "span": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "span", + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head><template><table></table></template></head><body><span>Foo</span></body></html>", + "noQuirksBodyHtml": "<template><table></table></template><span>Foo</span>" + } + }, + { + "data": "<template><td></template><body><span>Foo", + "errors": [ + "no doctype", + "bad eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "td": true, + "body": true, + "span": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "span", + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head><template><td></td></template></head><body><span>Foo</span></body></html>", + "noQuirksBodyHtml": "<template><td></td></template><span>Foo</span>" + } + }, + { + "data": "<template><object></template><body><span>Foo", + "errors": [ + "no doctype", + "missing /object", + "bad eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "object": true, + "body": true, + "span": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "object" + } + ] + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "span", + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head><template><object></object></template></head><body><span>Foo</span></body></html>", + "noQuirksBodyHtml": "<template><object></object></template><span>Foo</span>" + } + }, + { + "data": "<template><svg><template>", + "errors": [ + "no doctype", + "eof in template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "svg svg": true, + "svg template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "template", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><svg><template></template></svg></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><svg><template></template></svg></template>" + } + }, + { + "data": "<template><svg><foo><template><foreignObject><div></template><div>", + "errors": [ + "no doctype", + "ugly template closure", + "bad eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "svg svg": true, + "svg foo": true, + "svg template": true, + "svg foreignObject": true, + "div": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foo", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "template", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head><template><svg><foo><template><foreignObject><div></div></foreignObject></template></foo></svg></template></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<template><svg><foo><template><foreignObject><div></div></foreignObject></template></foo></svg></template><div></div>" + } + }, + { + "data": "<dummy><template><span></dummy>", + "errors": [ + "no doctype", + "bad end tag </dummy>", + "eof in template", + "eof in dummy" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dummy": true, + "template": true, + "span": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dummy", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><dummy><template><span></span></template></dummy></body></html>", + "noQuirksBodyHtml": "<dummy><template><span></span></template></dummy>" + } + }, + { + "data": "<body><table><tr><td><select><template>Foo</template><caption>A</table>", + "errors": [ + "no doctype", + "(1,62): unexpected-caption-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "select": true, + "template": true, + "caption": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "caption", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><select><template>Foo</template></select></td></tr></tbody><caption>A</caption></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><select><template>Foo</template></select></td></tr></tbody><caption>A</caption></table>" + } + }, + { + "data": "<body></body><template>", + "errors": [ + "no doctype", + "(1,23): template-after-body", + "(1,24): eof-in-template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "template": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><template></template></body></html>", + "noQuirksBodyHtml": "<template></template>" + } + }, + { + "data": "<head></head><template>", + "errors": [ + "no doctype", + "(1,23): template-after-head", + "(1,24): eof-in-template" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template></template></head><body></body></html>", + "noQuirksBodyHtml": "<template></template>" + } + }, + { + "data": "<head></head><template>Foo</template>", + "errors": [ + "no doctype", + "(1,23): template-after-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "text": "Foo" + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template>Foo</template></head><body></body></html>", + "noQuirksBodyHtml": "<template>Foo</template>" + } + }, + { + "data": "<!DOCTYPE HTML><dummy><table><template><table><template><table><script>", + "errors": [ + "eof script", + "eof template", + "eof template", + "eof table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dummy": true, + "table": true, + "template": true, + "script": true + }, + "doctype": true, + "template": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dummy", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "script" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><dummy><table><template><table><template><table><script></script></table></template></table></template></table></dummy></body></html>", + "noQuirksBodyHtml": "<dummy><table><template><table><template><table><script></script></table></template></table></template></table></dummy>" + } + }, + { + "data": "<template><a><table><a>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "template": true, + "a": true, + "table": true, + "body": true + }, + "template": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "template", + "children": [ + { + "content": true, + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "a" + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><template><a><a></a><table></table></a></template></head><body></body></html>", + "noQuirksBodyHtml": "<template><a><a></a><table></table></a></template>" + } + } + ], + "tests1.dat": [ + { + "data": "Test", + "errors": [ + "(1,0): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Test" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>Test</body></html>", + "noQuirksBodyHtml": "Test" + } + }, + { + "data": "<p>One<p>Two", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "One" + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "Two" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p>One</p><p>Two</p></body></html>", + "noQuirksBodyHtml": "<p>One</p><p>Two</p>" + } + }, + { + "data": "Line1<br>Line2<br>Line3<br>Line4", + "errors": [ + "(1,0): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Line1" + }, + { + "tag": "br" + }, + { + "text": "Line2" + }, + { + "tag": "br" + }, + { + "text": "Line3" + }, + { + "tag": "br" + }, + { + "text": "Line4" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>Line1<br>Line2<br>Line3<br>Line4</body></html>", + "noQuirksBodyHtml": "Line1<br>Line2<br>Line3<br>Line4" + } + }, + { + "data": "<html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<head>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head></head>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head></head><body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head></head><body></body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head><body></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><head><body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<head></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</head>", + "errors": [ + "(1,7): expected-doctype-but-got-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</body>", + "errors": [ + "(1,7): expected-doctype-but-got-end-tag element." + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</html>", + "errors": [ + "(1,7): expected-doctype-but-got-end-tag element." + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<b><table><td><i></table>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,25): unexpected-cell-end-tag", + "(1,25): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><table><tbody><tr><td><i></i></td></tr></tbody></table></b></body></html>", + "noQuirksBodyHtml": "<b><table><tbody><tr><td><i></i></td></tr></tbody></table></b>" + } + }, + { + "data": "<b><table><td></b><i></table>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,18): unexpected-end-tag", + "(1,29): unexpected-cell-end-tag", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><table><tbody><tr><td><i></i></td></tr></tbody></table>X</b></body></html>", + "noQuirksBodyHtml": "<b><table><tbody><tr><td><i></i></td></tr></tbody></table>X</b>" + } + }, + { + "data": "<h1>Hello<h2>World", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,13): unexpected-start-tag", + "(1,18): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "h1": true, + "h2": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "h1", + "children": [ + { + "text": "Hello" + } + ] + }, + { + "tag": "h2", + "children": [ + { + "text": "World" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><h1>Hello</h1><h2>World</h2></body></html>", + "noQuirksBodyHtml": "<h1>Hello</h1><h2>World</h2>" + } + }, + { + "data": "<a><p>X<a>Y</a>Z</p></a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,10): unexpected-start-tag-implies-end-tag", + "(1,10): adoption-agency-1.3", + "(1,24): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a" + }, + { + "tag": "p", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "X" + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "Y" + } + ] + }, + { + "text": "Z" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a></a><p><a>X</a><a>Y</a>Z</p></body></html>", + "noQuirksBodyHtml": "<a></a><p><a>X</a><a>Y</a>Z</p>" + } + }, + { + "data": "<b><button>foo</b>bar", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,18): adoption-agency-1.3", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "button": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b" + }, + { + "tag": "button", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "foo" + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b></b><button><b>foo</b>bar</button></body></html>", + "noQuirksBodyHtml": "<b></b><button><b>foo</b>bar</button>" + } + }, + { + "data": "<!DOCTYPE html><span><button>foo</span>bar", + "errors": [ + "(1,39): unexpected-end-tag", + "(1,42): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "span": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "button", + "children": [ + { + "text": "foobar" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><span><button>foobar</button></span></body></html>", + "noQuirksBodyHtml": "<span><button>foobar</button></span>" + } + }, + { + "data": "<p><b><div><marquee></p></b></div>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag", + "(1,24): unexpected-end-tag", + "(1,28): unexpected-end-tag", + "(1,34): end-tag-too-early", + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true, + "div": true, + "marquee": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "marquee", + "children": [ + { + "tag": "p" + }, + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><b></b></p><div><b><marquee><p></p>X</marquee></b></div></body></html>", + "noQuirksBodyHtml": "<p><b></b></p><div><b><marquee><p></p>X</marquee></b></div>" + } + }, + { + "data": "<script><div></script></div><title><p></title><p><p>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,28): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "title": true, + "body": true, + "p": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<div>", + "no_escape": true + } + ] + }, + { + "tag": "title", + "children": [ + { + "text": "<p>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head><script><div></script><title>&lt;p&gt;</title></head><body><p></p><p></p></body></html>", + "noQuirksBodyHtml": "<script><div></script><title>&lt;p&gt;</title><p></p><p></p>" + } + }, + { + "data": "<!--><div>--<!-->", + "errors": [ + "(1,5): incorrect-comment", + "(1,10): expected-doctype-but-got-start-tag", + "(1,17): incorrect-comment", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "comment": true + }, + "tree": [ + { + "comment": "" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "--" + }, + { + "comment": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!----><html><head></head><body><div>--<!----></div></body></html>", + "noQuirksBodyHtml": "<!----><div>--<!----></div>" + } + }, + { + "data": "<p><hr></p>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "hr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "hr" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p></p><hr><p></p></body></html>", + "noQuirksBodyHtml": "<p></p><hr><p></p>" + } + }, + { + "data": "<select><b><option><select><option></b></select>X", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): unexpected-start-tag-in-select", + "(1,27): unexpected-select-in-select", + "(1,39): unexpected-end-tag", + "(1,48): unexpected-end-tag", + "(1,49): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + }, + { + "tag": "option", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option></option></select><option>X</option></body></html>", + "noQuirksBodyHtml": "<select><option></option></select><option>X</option>" + } + }, + { + "data": "<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,35): unexpected-start-tag-implies-end-tag", + "(1,40): unexpected-cell-end-tag", + "(1,43): unexpected-start-tag-implies-table-voodoo", + "(1,43): unexpected-start-tag-implies-end-tag", + "(1,43): unexpected-end-tag", + "(1,63): unexpected-start-tag-implies-end-tag", + "(1,64): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "a" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "table" + } + ] + }, + { + "tag": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "X" + } + ] + }, + { + "text": "C" + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "Y" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><a></a><table><tbody><tr><td><a><table></table></a><a></a></td></tr></tbody></table></a><a><b>X</b>C</a><a>Y</a></body></html>", + "noQuirksBodyHtml": "<a><a></a><table><tbody><tr><td><a><table></table></a><a></a></td></tr></tbody></table></a><a><b>X</b>C</a><a>Y</a>" + } + }, + { + "data": "<a X>0<b>1<a Y>2", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-implies-end-tag", + "(1,15): adoption-agency-1.3", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "x", + "value": "" + } + ], + "children": [ + { + "text": "0" + }, + { + "tag": "b", + "children": [ + { + "text": "1" + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "y", + "value": "" + } + ], + "children": [ + { + "text": "2" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a x=\"\">0<b>1</b></a><b><a y=\"\">2</a></b></body></html>", + "noQuirksBodyHtml": "<a x=\"\">0<b>1</b></a><b><a y=\"\">2</a></b>" + } + }, + { + "data": "<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->", + "errors": [ + "(1,7): unexpected-dash-after-double-dash-in-comment", + "(1,14): expected-doctype-but-got-start-tag", + "(1,41): unexpected-start-tag-implies-table-voodoo", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): foster-parenting-character-in-table", + "(1,48): unexpected-cell-in-table-body", + "(1,63): unexpected-cell-end-tag", + "(1,71): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "div": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "th": true, + "i": true + }, + "comment": true + }, + "tree": [ + { + "comment": "-" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "helloexcite!" + }, + { + "tag": "b", + "children": [ + { + "text": "me!" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "th", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "please!" + } + ] + } + ] + } + ] + }, + { + "comment": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!-----><html><head></head><body><font><div>helloexcite!<b>me!</b><table><tbody><tr><th><i>please!</i></th></tr><!--X--></tbody></table></div></font></body></html>", + "noQuirksBodyHtml": "<!-----><font><div>helloexcite!<b>me!</b><table><tbody><tr><th><i>please!</i></th></tr><!--X--></tbody></table></div></font>" + } + }, + { + "data": "<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "li": true, + "ul": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "li", + "children": [ + { + "text": "hello" + } + ] + }, + { + "tag": "li", + "children": [ + { + "text": "world" + }, + { + "tag": "ul", + "children": [ + { + "text": "how" + }, + { + "tag": "li", + "children": [ + { + "text": "do" + } + ] + } + ] + }, + { + "text": "you" + } + ] + } + ] + }, + { + "comment": "do" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><li>hello</li><li>world<ul>how<li>do</li></ul>you</li></body><!--do--></html>", + "noQuirksBodyHtml": "<li>hello</li><li>world<ul>how<li>do</li></ul>you<!--do--></li>" + } + }, + { + "data": "<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E", + "errors": [ + "(1,54): unexpected-end-tag-in-select", + "(1,55): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "option": true, + "optgroup": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A" + }, + { + "tag": "option", + "children": [ + { + "text": "B" + } + ] + }, + { + "tag": "optgroup", + "children": [ + { + "text": "C" + }, + { + "tag": "select", + "children": [ + { + "text": "DE" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>A<option>B</option><optgroup>C<select>DE</select></optgroup></body></html>", + "noQuirksBodyHtml": "A<option>B</option><optgroup>C<select>DE</select></optgroup>" + } + }, + { + "data": "<", + "errors": [ + "(1,1): expected-tag-name", + "(1,1): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "<", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&lt;</body></html>", + "noQuirksBodyHtml": "&lt;" + } + }, + { + "data": "<#", + "errors": [ + "(1,1): expected-tag-name", + "(1,1): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "<#", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&lt;#</body></html>", + "noQuirksBodyHtml": "&lt;#" + } + }, + { + "data": "</", + "errors": [ + "(1,2): expected-closing-tag-but-got-eof", + "(1,2): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "</", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&lt;/</body></html>", + "noQuirksBodyHtml": "&lt;/" + } + }, + { + "data": "</#", + "errors": [ + "(1,2): expected-closing-tag-but-got-char", + "(1,3): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "#" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--#--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--#-->" + } + }, + { + "data": "<?", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,2): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--?--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--?-->" + } + }, + { + "data": "<?#", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,3): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?#" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--?#--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--?#-->" + } + }, + { + "data": "<!", + "errors": [ + "(1,2): expected-dashes-or-doctype", + "(1,2): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!----><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!---->" + } + }, + { + "data": "<!#", + "errors": [ + "(1,2): expected-dashes-or-doctype", + "(1,3): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "#" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--#--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--#-->" + } + }, + { + "data": "<?COMMENT?>", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,11): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?COMMENT?" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--?COMMENT?--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--?COMMENT?-->" + } + }, + { + "data": "<!COMMENT>", + "errors": [ + "(1,2): expected-dashes-or-doctype", + "(1,10): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "COMMENT" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--COMMENT--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--COMMENT-->" + } + }, + { + "data": "</ COMMENT >", + "errors": [ + "(1,2): expected-closing-tag-but-got-char", + "(1,12): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": " COMMENT " + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!-- COMMENT --><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- COMMENT -->" + } + }, + { + "data": "<?COM--MENT?>", + "errors": [ + "(1,1): expected-tag-name-but-got-question-mark", + "(1,13): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "?COM--MENT?" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--?COM--MENT?--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--?COM--MENT?-->" + } + }, + { + "data": "<!COM--MENT>", + "errors": [ + "(1,2): expected-dashes-or-doctype", + "(1,12): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "COM--MENT" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!--COM--MENT--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--COM--MENT-->" + } + }, + { + "data": "</ COM--MENT >", + "errors": [ + "(1,2): expected-closing-tag-but-got-char", + "(1,14): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": " COM--MENT " + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!-- COM--MENT --><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- COM--MENT -->" + } + }, + { + "data": "<!DOCTYPE html><style> EOF", + "errors": [ + "(1,26): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " EOF", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style> EOF</style></head><body></body></html>", + "noQuirksBodyHtml": "<style> EOF</style>" + } + }, + { + "data": "<!DOCTYPE html><script> <!-- </script> --> </script> EOF", + "errors": [ + "(1,52): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": " <!-- ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "--> EOF", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script> <!-- </script> </head><body>--&gt; EOF</body></html>", + "noQuirksBodyHtml": "<script> <!-- </script> --&gt; EOF" + } + }, + { + "data": "<b><p></b>TEST", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,10): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b" + }, + { + "tag": "p", + "children": [ + { + "tag": "b" + }, + { + "text": "TEST" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b></b><p><b></b>TEST</p></body></html>", + "noQuirksBodyHtml": "<b></b><p><b></b>TEST</p>" + } + }, + { + "data": "<p id=a><b><p id=b></b>TEST", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,19): unexpected-end-tag", + "(1,23): adoption-agency-1.2" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "p", + "attrs": [ + { + "name": "id", + "value": "b" + } + ], + "children": [ + { + "text": "TEST" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p id=\"a\"><b></b></p><p id=\"b\">TEST</p></body></html>", + "noQuirksBodyHtml": "<p id=\"a\"><b></b></p><p id=\"b\">TEST</p>" + } + }, + { + "data": "<b id=a><p><b id=b></p></b>TEST", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,23): unexpected-end-tag", + "(1,27): adoption-agency-1.2", + "(1,31): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "b" + } + ] + } + ] + }, + { + "text": "TEST" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b id=\"a\"><p><b id=\"b\"></b></p>TEST</b></body></html>", + "noQuirksBodyHtml": "<b id=\"a\"><p><b id=\"b\"></b></p>TEST</b>" + } + }, + { + "data": "<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>", + "errors": [ + "(1,61): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true, + "div": true, + "p": true, + "u": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "U-test" + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "Test" + }, + { + "tag": "u" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>U-test</title></head><body><div><p>Test<u></u></p></div></body></html>", + "noQuirksBodyHtml": "<title>U-test</title><div><p>Test<u></u></p></div>" + } + }, + { + "data": "<!DOCTYPE html><font><table></font></table></font>", + "errors": [ + "(1,35): unexpected-end-tag-implies-table-voodoo", + "(1,35): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><font><table></table></font></body></html>", + "noQuirksBodyHtml": "<font><table></table></font>" + } + }, + { + "data": "<font><p>hello<b>cruel</font>world", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,29): adoption-agency-1.3", + "(1,29): adoption-agency-1.3", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "p": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font" + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "children": [ + { + "text": "hello" + }, + { + "tag": "b", + "children": [ + { + "text": "cruel" + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "text": "world" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><font></font><p><font>hello<b>cruel</b></font><b>world</b></p></body></html>", + "noQuirksBodyHtml": "<font></font><p><font>hello<b>cruel</b></font><b>world</b></p>" + } + }, + { + "data": "<b>Test</i>Test", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "TestTest" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b>TestTest</b></body></html>", + "noQuirksBodyHtml": "<b>TestTest</b>" + } + }, + { + "data": "<b>A<cite>B<div>C", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "cite": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "A" + }, + { + "tag": "cite", + "children": [ + { + "text": "B" + }, + { + "tag": "div", + "children": [ + { + "text": "C" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b>A<cite>B<div>C</div></cite></b></body></html>", + "noQuirksBodyHtml": "<b>A<cite>B<div>C</div></cite></b>" + } + }, + { + "data": "<b>A<cite>B<div>C</cite>D", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,24): unexpected-end-tag", + "(1,25): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "cite": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "A" + }, + { + "tag": "cite", + "children": [ + { + "text": "B" + }, + { + "tag": "div", + "children": [ + { + "text": "CD" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b>A<cite>B<div>CD</div></cite></b></body></html>", + "noQuirksBodyHtml": "<b>A<cite>B<div>CD</div></cite></b>" + } + }, + { + "data": "<b>A<cite>B<div>C</b>D", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,21): adoption-agency-1.3", + "(1,22): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "cite": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "A" + }, + { + "tag": "cite", + "children": [ + { + "text": "B" + } + ] + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "C" + } + ] + }, + { + "text": "D" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b>A<cite>B</cite></b><div><b>C</b>D</div></body></html>", + "noQuirksBodyHtml": "<b>A<cite>B</cite></b><div><b>C</b>D</div>" + } + }, + { + "data": "", + "errors": [ + "(1,0): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<DIV>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,5): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<DIV> abc", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,9): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc</div></body></html>", + "noQuirksBodyHtml": "<div> abc</div>" + } + }, + { + "data": "<DIV> abc <B>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,13): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b></b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b></b></div>" + } + }, + { + "data": "<DIV> abc <B> def", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def</b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def</b></div>" + } + }, + { + "data": "<DIV> abc <B> def <I>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i></i></b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i></i></b></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,25): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi</i></b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi</i></b></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + }, + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi <p></p></i></b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi <p></p></i></b></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + }, + { + "tag": "p", + "children": [ + { + "text": " jkl" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi <p> jkl</p></i></b></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi <p> jkl</p></i></b></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i><p><b> jkl </b></p></i></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i><p><b> jkl </b></p></i></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B> mno", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,42): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + }, + { + "text": " mno" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i><p><b> jkl </b> mno</p></i></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i><p><b> jkl </b> mno</p></i></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,47): adoption-agency-1.3", + "(1,47): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i" + }, + { + "tag": "p", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + }, + { + "text": " mno " + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i></p></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i></p></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,47): adoption-agency-1.3", + "(1,51): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i" + }, + { + "tag": "p", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + }, + { + "text": " mno " + } + ] + }, + { + "text": " pqr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr</p></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr</p></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,47): adoption-agency-1.3", + "(1,56): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i" + }, + { + "tag": "p", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + }, + { + "text": " mno " + } + ] + }, + { + "text": " pqr " + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr </p></div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr </p></div>" + } + }, + { + "data": "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,38): adoption-agency-1.3", + "(1,47): adoption-agency-1.3", + "(1,60): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "i": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": " abc " + }, + { + "tag": "b", + "children": [ + { + "text": " def " + }, + { + "tag": "i", + "children": [ + { + "text": " ghi " + } + ] + } + ] + }, + { + "tag": "i" + }, + { + "tag": "p", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "b", + "children": [ + { + "text": " jkl " + } + ] + }, + { + "text": " mno " + } + ] + }, + { + "text": " pqr " + } + ] + }, + { + "text": " stu" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr </p> stu</div></body></html>", + "noQuirksBodyHtml": "<div> abc <b> def <i> ghi </i></b><i></i><p><i><b> jkl </b> mno </i> pqr </p> stu</div>" + } + }, + { + "data": "<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->", + "errors": [ + "(1,1040): expected-doctype-but-got-start-tag", + "(1,1040): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "test": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "test", + "attrs": [ + { + "name": "attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><test attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=\"\"></test></body></html>", + "noQuirksBodyHtml": "<test attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=\"\"></test>" + } + }, + { + "data": "<a href=\"blah\">aba<table><a href=\"foo\">br<tr><td></td></tr>x</table>aoe", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag", + "(1,39): unexpected-start-tag-implies-table-voodoo", + "(1,39): unexpected-start-tag-implies-end-tag", + "(1,39): unexpected-end-tag", + "(1,45): foster-parenting-character-in-table", + "(1,45): foster-parenting-character-in-table", + "(1,68): foster-parenting-character-in-table", + "(1,71): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "blah" + } + ], + "children": [ + { + "text": "aba" + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "foo" + } + ], + "children": [ + { + "text": "br" + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "foo" + } + ], + "children": [ + { + "text": "x" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "foo" + } + ], + "children": [ + { + "text": "aoe" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a href=\"blah\">aba<a href=\"foo\">br</a><a href=\"foo\">x</a><table><tbody><tr><td></td></tr></tbody></table></a><a href=\"foo\">aoe</a></body></html>", + "noQuirksBodyHtml": "<a href=\"blah\">aba<a href=\"foo\">br</a><a href=\"foo\">x</a><table><tbody><tr><td></td></tr></tbody></table></a><a href=\"foo\">aoe</a>" + } + }, + { + "data": "<a href=\"blah\">aba<table><tr><td><a href=\"foo\">br</td></tr>x</table>aoe", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag", + "(1,54): unexpected-cell-end-tag", + "(1,68): unexpected text in table", + "(1,71): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "blah" + } + ], + "children": [ + { + "text": "abax" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "foo" + } + ], + "children": [ + { + "text": "br" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "aoe" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a href=\"blah\">abax<table><tbody><tr><td><a href=\"foo\">br</a></td></tr></tbody></table>aoe</a></body></html>", + "noQuirksBodyHtml": "<a href=\"blah\">abax<table><tbody><tr><td><a href=\"foo\">br</a></td></tr></tbody></table>aoe</a>" + } + }, + { + "data": "<table><a href=\"blah\">aba<tr><td><a href=\"foo\">br</td></tr>x</table>aoe", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,22): unexpected-start-tag-implies-table-voodoo", + "(1,29): foster-parenting-character-in-table", + "(1,29): foster-parenting-character-in-table", + "(1,29): foster-parenting-character-in-table", + "(1,54): unexpected-cell-end-tag", + "(1,68): foster-parenting-character-in-table", + "(1,71): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "blah" + } + ], + "children": [ + { + "text": "aba" + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "blah" + } + ], + "children": [ + { + "text": "x" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "foo" + } + ], + "children": [ + { + "text": "br" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "blah" + } + ], + "children": [ + { + "text": "aoe" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a href=\"blah\">aba</a><a href=\"blah\">x</a><table><tbody><tr><td><a href=\"foo\">br</a></td></tr></tbody></table><a href=\"blah\">aoe</a></body></html>", + "noQuirksBodyHtml": "<a href=\"blah\">aba</a><a href=\"blah\">x</a><table><tbody><tr><td><a href=\"foo\">br</a></td></tr></tbody></table><a href=\"blah\">aoe</a>" + } + }, + { + "data": "<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,45): end-tag-too-early", + "(1,47): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "marquee": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "a" + } + ], + "children": [ + { + "text": "aa" + }, + { + "tag": "marquee", + "children": [ + { + "text": "aa" + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "b" + } + ], + "children": [ + { + "text": "bb" + } + ] + } + ] + }, + { + "text": "aa" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a href=\"a\">aa<marquee>aa<a href=\"b\">bb</a></marquee>aa</a></body></html>", + "noQuirksBodyHtml": "<a href=\"a\">aa<marquee>aa<a href=\"b\">bb</a></marquee>aa</a>" + } + }, + { + "data": "<wbr><strike><code></strike><code><strike></code>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,28): adoption-agency-1.3", + "(1,49): adoption-agency-1.3", + "(1,49): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "wbr": true, + "strike": true, + "code": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "wbr" + }, + { + "tag": "strike", + "children": [ + { + "tag": "code" + } + ] + }, + { + "tag": "code", + "children": [ + { + "tag": "code", + "children": [ + { + "tag": "strike" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><wbr><strike><code></code></strike><code><code><strike></strike></code></code></body></html>", + "noQuirksBodyHtml": "<wbr><strike><code></code></strike><code><code><strike></strike></code></code>" + } + }, + { + "data": "<!DOCTYPE html><spacer>foo", + "errors": [ + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "spacer": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "spacer", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><spacer>foo</spacer></body></html>", + "noQuirksBodyHtml": "<spacer>foo</spacer>" + } + }, + { + "data": "<title><meta></title><link><title><meta></title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "link": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<meta>", + "escaped": true + } + ] + }, + { + "tag": "link" + }, + { + "tag": "title", + "children": [ + { + "text": "<meta>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>&lt;meta&gt;</title><link><title>&lt;meta&gt;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;meta&gt;</title><link><title>&lt;meta&gt;</title>" + } + }, + { + "data": "<style><!--</style><meta><script>--><link></script>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "meta": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + }, + { + "tag": "meta" + }, + { + "tag": "script", + "children": [ + { + "text": "--><link>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><style><!--</style><meta><script>--><link></script></head><body></body></html>", + "noQuirksBodyHtml": "<style><!--</style><meta><script>--><link></script>" + } + }, + { + "data": "<head><meta></head><link>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,25): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "link": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "meta" + }, + { + "tag": "link" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><meta><link></head><body></body></html>", + "noQuirksBodyHtml": "<meta><link>" + } + }, + { + "data": "<table><tr><tr><td><td><span><th><span>X</table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,33): unexpected-cell-end-tag", + "(1,48): unexpected-cell-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "span": true, + "th": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + }, + { + "tag": "td", + "children": [ + { + "tag": "span" + } + ] + }, + { + "tag": "th", + "children": [ + { + "tag": "span", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr></tr><tr><td></td><td><span></span></td><th><span>X</span></th></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr></tr><tr><td></td><td><span></span></td><th><span>X</span></th></tr></tbody></table>" + } + }, + { + "data": "<body><body><base><link><meta><title><p></title><body><p></body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,12): unexpected-start-tag", + "(1,54): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "base": true, + "link": true, + "meta": true, + "title": true, + "p": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "base" + }, + { + "tag": "link" + }, + { + "tag": "meta" + }, + { + "tag": "title", + "children": [ + { + "text": "<p>", + "escaped": true + } + ] + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><base><link><meta><title>&lt;p&gt;</title><p></p></body></html>", + "noQuirksBodyHtml": "<base><link><meta><title>&lt;p&gt;</title><p></p>" + } + }, + { + "data": "<textarea><p></textarea>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<p>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>&lt;p&gt;</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>&lt;p&gt;</textarea>" + } + }, + { + "data": "<p><image></p>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,10): unexpected-start-tag-treated-as" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "img": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "img" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><img></p></body></html>", + "noQuirksBodyHtml": "<p><img></p>" + } + }, + { + "data": "<a><table><a></table><p><a><div><a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,13): unexpected-start-tag-implies-table-voodoo", + "(1,13): unexpected-start-tag-implies-end-tag", + "(1,13): adoption-agency-1.3", + "(1,27): unexpected-start-tag-implies-end-tag", + "(1,27): adoption-agency-1.2", + "(1,32): unexpected-end-tag", + "(1,35): unexpected-start-tag-implies-end-tag", + "(1,35): adoption-agency-1.2", + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "p": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "a" + }, + { + "tag": "table" + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "a" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><a></a><table></table></a><p><a></a></p><div><a></a></div></body></html>", + "noQuirksBodyHtml": "<a><a></a><table></table></a><p><a></a></p><div><a></a></div>" + } + }, + { + "data": "<head></p><meta><p>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,10): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "body": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "meta" + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head><meta></head><body><p></p></body></html>", + "noQuirksBodyHtml": "<p></p><meta><p></p>" + } + }, + { + "data": "<head></html><meta><p>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,19): expected-eof-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "meta": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "meta" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><meta><p></p></body></html>", + "noQuirksBodyHtml": "<meta><p></p>" + } + }, + { + "data": "<b><table><td><i></table>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,25): unexpected-cell-end-tag", + "(1,25): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><table><tbody><tr><td><i></i></td></tr></tbody></table></b></body></html>", + "noQuirksBodyHtml": "<b><table><tbody><tr><td><i></i></td></tr></tbody></table></b>" + } + }, + { + "data": "<b><table><td></b><i></table>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,18): unexpected-end-tag", + "(1,29): unexpected-cell-end-tag", + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><table><tbody><tr><td><i></i></td></tr></tbody></table></b></body></html>", + "noQuirksBodyHtml": "<b><table><tbody><tr><td><i></i></td></tr></tbody></table></b>" + } + }, + { + "data": "<h1><h2>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,8): unexpected-start-tag", + "(1,8): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "h1": true, + "h2": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "h1" + }, + { + "tag": "h2" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><h1></h1><h2></h2></body></html>", + "noQuirksBodyHtml": "<h1></h1><h2></h2>" + } + }, + { + "data": "<a><p><a></a></p></a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,9): unexpected-start-tag-implies-end-tag", + "(1,9): adoption-agency-1.3", + "(1,21): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a" + }, + { + "tag": "p", + "children": [ + { + "tag": "a" + }, + { + "tag": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a></a><p><a></a><a></a></p></body></html>", + "noQuirksBodyHtml": "<a></a><p><a></a><a></a></p>" + } + }, + { + "data": "<b><button></b></button></b>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,15): adoption-agency-1.3", + "(1,28): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "button": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b" + }, + { + "tag": "button", + "children": [ + { + "tag": "b" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b></b><button><b></b></button></body></html>", + "noQuirksBodyHtml": "<b></b><button><b></b></button>" + } + }, + { + "data": "<p><b><div><marquee></p></b></div>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag", + "(1,24): unexpected-end-tag", + "(1,28): unexpected-end-tag", + "(1,34): end-tag-too-early", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true, + "div": true, + "marquee": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "marquee", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><b></b></p><div><b><marquee><p></p></marquee></b></div></body></html>", + "noQuirksBodyHtml": "<p><b></b></p><div><b><marquee><p></p></marquee></b></div>" + } + }, + { + "data": "<script></script></div><title></title><p><p>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,23): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "title": true, + "body": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + }, + { + "tag": "title" + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head><script></script><title></title></head><body><p></p><p></p></body></html>", + "noQuirksBodyHtml": "<script></script><title></title><p></p><p></p>" + } + }, + { + "data": "<p><hr></p>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "hr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "hr" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p></p><hr><p></p></body></html>", + "noQuirksBodyHtml": "<p></p><hr><p></p>" + } + }, + { + "data": "<select><b><option><select><option></b></select>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): unexpected-start-tag-in-select", + "(1,27): unexpected-select-in-select", + "(1,39): unexpected-end-tag", + "(1,48): unexpected-end-tag", + "(1,48): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + }, + { + "tag": "option" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option></option></select><option></option></body></html>", + "noQuirksBodyHtml": "<select><option></option></select><option></option>" + } + }, + { + "data": "<html><head><title></title><body></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title></title></head><body></body></html>", + "noQuirksBodyHtml": "<title></title>" + } + }, + { + "data": "<a><table><td><a><table></table><a></tr><a></table><a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-cell-in-table-body", + "(1,35): unexpected-start-tag-implies-end-tag", + "(1,40): unexpected-cell-end-tag", + "(1,43): unexpected-start-tag-implies-table-voodoo", + "(1,43): unexpected-start-tag-implies-end-tag", + "(1,43): unexpected-end-tag", + "(1,54): unexpected-start-tag-implies-end-tag", + "(1,54): adoption-agency-1.2", + "(1,54): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "a" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "table" + } + ] + }, + { + "tag": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "a" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><a></a><table><tbody><tr><td><a><table></table></a><a></a></td></tr></tbody></table></a><a></a></body></html>", + "noQuirksBodyHtml": "<a><a></a><table><tbody><tr><td><a><table></table></a><a></a></td></tr></tbody></table></a><a></a>" + } + }, + { + "data": "<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,45): end-tag-too-early", + "(1,58): end-tag-too-early", + "(1,69): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ul": true, + "li": true, + "div": true, + "address": true, + "b": true, + "em": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li" + }, + { + "tag": "div", + "children": [ + { + "tag": "li" + } + ] + }, + { + "tag": "li" + }, + { + "tag": "li", + "children": [ + { + "tag": "div" + } + ] + }, + { + "tag": "li", + "children": [ + { + "tag": "address" + } + ] + }, + { + "tag": "li", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "em" + } + ] + } + ] + }, + { + "tag": "li" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ul><li></li><div><li></li></div><li></li><li><div></div></li><li><address></address></li><li><b><em></em></b></li><li></li></ul></body></html>", + "noQuirksBodyHtml": "<ul><li></li><div><li></li></div><li></li><li><div></div></li><li><address></address></li><li><b><em></em></b></li><li></li></ul>" + } + }, + { + "data": "<ul><li><ul></li><li>a</li></ul></li></ul>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,17): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ul": true, + "li": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ul><li><ul><li>a</li></ul></li></ul></body></html>", + "noQuirksBodyHtml": "<ul><li><ul><li>a</li></ul></li></ul>" + } + }, + { + "data": "<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true, + "noframes": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + }, + { + "tag": "noframes" + } + ] + } + ] + } + ], + "html": "<html><head></head><frameset><frame><frameset><frame></frameset><noframes></noframes></frameset></html>", + "noQuirksBodyHtml": "<noframes></noframes>" + } + }, + { + "data": "<h1><table><td><h3></table><h3></h1>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,15): unexpected-cell-in-table-body", + "(1,27): unexpected-cell-end-tag", + "(1,31): unexpected-start-tag", + "(1,36): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "h1": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "h3": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "h1", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "h3" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "h3" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><h1><table><tbody><tr><td><h3></h3></td></tr></tbody></table></h1><h3></h3></body></html>", + "noQuirksBodyHtml": "<h1><table><tbody><tr><td><h3></h3></td></tr></tbody></table></h1><h3></h3>" + } + }, + { + "data": "<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "col": true, + "thead": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + }, + { + "tag": "col" + }, + { + "tag": "col" + } + ] + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + }, + { + "tag": "col" + } + ] + }, + { + "tag": "thead", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup><col></colgroup><colgroup><col><col><col></colgroup><colgroup><col><col></colgroup><thead><tr><td></td></tr></thead></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup><col></colgroup><colgroup><col><col><col></colgroup><colgroup><col><col></colgroup><thead><tr><td></td></tr></thead></table>" + } + }, + { + "data": "<table><col><tbody><col><tr><col><td><col></table><col>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,37): unexpected-cell-in-table-body", + "(1,55): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "col": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "tbody" + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup><col></colgroup><tbody></tbody><colgroup><col></colgroup><tbody><tr></tr></tbody><colgroup><col></colgroup><tbody><tr><td></td></tr></tbody><colgroup><col></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup><col></colgroup><tbody></tbody><colgroup><col></colgroup><tbody><tr></tr></tbody><colgroup><col></colgroup><tbody><tr><td></td></tr></tbody><colgroup><col></colgroup></table>" + } + }, + { + "data": "<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,52): unexpected-cell-in-table-body", + "(1,80): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + }, + { + "tag": "tbody" + }, + { + "tag": "colgroup" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + }, + { + "tag": "colgroup" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + }, + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup></colgroup><tbody></tbody><colgroup></colgroup><tbody><tr></tr></tbody><colgroup></colgroup><tbody><tr><td></td></tr></tbody><colgroup></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup></colgroup><tbody></tbody><colgroup></colgroup><tbody><tr></tr></tbody><colgroup></colgroup><tbody><tr><td></td></tr></tbody><colgroup></colgroup></table>" + } + }, + { + "data": "</strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>", + "errors": [ + "(1,9): expected-doctype-but-got-end-tag", + "(1,9): unexpected-end-tag-before-html", + "(1,13): unexpected-end-tag-before-html", + "(1,18): unexpected-end-tag-before-html", + "(1,22): unexpected-end-tag-before-html", + "(1,26): unexpected-end-tag-before-html", + "(1,35): unexpected-end-tag-before-html", + "(1,39): unexpected-end-tag-before-html", + "(1,47): unexpected-end-tag-before-html", + "(1,52): unexpected-end-tag-before-html", + "(1,58): unexpected-end-tag-before-html", + "(1,64): unexpected-end-tag-before-html", + "(1,72): unexpected-end-tag-before-html", + "(1,79): unexpected-end-tag-before-html", + "(1,88): unexpected-end-tag-before-html", + "(1,93): unexpected-end-tag-before-html", + "(1,98): unexpected-end-tag-before-html", + "(1,103): unexpected-end-tag-before-html", + "(1,108): unexpected-end-tag-before-html", + "(1,113): unexpected-end-tag-before-html", + "(1,118): unexpected-end-tag-before-html", + "(1,130): unexpected-end-tag-after-body", + "(1,130): unexpected-end-tag-treated-as", + "(1,134): unexpected-end-tag", + "(1,140): unexpected-end-tag", + "(1,148): unexpected-end-tag", + "(1,155): unexpected-end-tag", + "(1,163): unexpected-end-tag", + "(1,172): unexpected-end-tag", + "(1,180): unexpected-end-tag", + "(1,185): unexpected-end-tag", + "(1,190): unexpected-end-tag", + "(1,195): unexpected-end-tag", + "(1,203): unexpected-end-tag", + "(1,210): unexpected-end-tag", + "(1,217): unexpected-end-tag", + "(1,225): unexpected-end-tag", + "(1,230): unexpected-end-tag", + "(1,238): unexpected-end-tag", + "(1,244): unexpected-end-tag", + "(1,251): unexpected-end-tag", + "(1,258): unexpected-end-tag", + "(1,269): unexpected-end-tag", + "(1,279): unexpected-end-tag", + "(1,287): unexpected-end-tag", + "(1,296): unexpected-end-tag", + "(1,300): unexpected-end-tag", + "(1,305): unexpected-end-tag", + "(1,310): unexpected-end-tag", + "(1,320): unexpected-end-tag", + "(1,331): unexpected-end-tag", + "(1,339): unexpected-end-tag", + "(1,347): unexpected-end-tag", + "(1,355): unexpected-end-tag", + "(1,365): end-tag-too-early", + "(1,378): end-tag-too-early", + "(1,387): end-tag-too-early", + "(1,393): end-tag-too-early", + "(1,399): end-tag-too-early", + "(1,404): end-tag-too-early", + "(1,415): end-tag-too-early", + "(1,425): end-tag-too-early", + "(1,432): end-tag-too-early", + "(1,437): end-tag-too-early", + "(1,442): end-tag-too-early", + "(1,447): unexpected-end-tag", + "(1,454): unexpected-end-tag", + "(1,460): unexpected-end-tag", + "(1,467): unexpected-end-tag", + "(1,476): end-tag-too-early", + "(1,486): end-tag-too-early", + "(1,495): end-tag-too-early", + "(1,513): expected-eof-but-got-end-tag", + "(1,513): unexpected-end-tag", + "(1,520): unexpected-end-tag", + "(1,529): unexpected-end-tag", + "(1,537): unexpected-end-tag", + "(1,547): unexpected-end-tag", + "(1,557): unexpected-end-tag", + "(1,568): unexpected-end-tag", + "(1,579): unexpected-end-tag", + "(1,590): unexpected-end-tag", + "(1,599): unexpected-end-tag", + "(1,611): unexpected-end-tag", + "(1,622): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><br><p></p></body></html>", + "noQuirksBodyHtml": "<br><p></p>" + } + }, + { + "data": "<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,20): unexpected-end-tag-implies-table-voodoo", + "(1,20): unexpected-end-tag", + "(1,24): unexpected-end-tag-implies-table-voodoo", + "(1,24): unexpected-end-tag", + "(1,29): unexpected-end-tag-implies-table-voodoo", + "(1,29): unexpected-end-tag", + "(1,33): unexpected-end-tag-implies-table-voodoo", + "(1,33): unexpected-end-tag", + "(1,37): unexpected-end-tag-implies-table-voodoo", + "(1,37): unexpected-end-tag", + "(1,46): unexpected-end-tag-implies-table-voodoo", + "(1,46): unexpected-end-tag", + "(1,50): unexpected-end-tag-implies-table-voodoo", + "(1,50): unexpected-end-tag", + "(1,58): unexpected-end-tag-implies-table-voodoo", + "(1,58): unexpected-end-tag", + "(1,63): unexpected-end-tag-implies-table-voodoo", + "(1,63): unexpected-end-tag", + "(1,69): unexpected-end-tag-implies-table-voodoo", + "(1,69): end-tag-too-early", + "(1,75): unexpected-end-tag-implies-table-voodoo", + "(1,75): unexpected-end-tag", + "(1,83): unexpected-end-tag-implies-table-voodoo", + "(1,83): unexpected-end-tag", + "(1,90): unexpected-end-tag-implies-table-voodoo", + "(1,90): unexpected-end-tag", + "(1,99): unexpected-end-tag-implies-table-voodoo", + "(1,99): unexpected-end-tag", + "(1,104): unexpected-end-tag-implies-table-voodoo", + "(1,104): end-tag-too-early", + "(1,109): unexpected-end-tag-implies-table-voodoo", + "(1,109): end-tag-too-early", + "(1,114): unexpected-end-tag-implies-table-voodoo", + "(1,114): end-tag-too-early", + "(1,119): unexpected-end-tag-implies-table-voodoo", + "(1,119): end-tag-too-early", + "(1,124): unexpected-end-tag-implies-table-voodoo", + "(1,124): end-tag-too-early", + "(1,129): unexpected-end-tag-implies-table-voodoo", + "(1,129): end-tag-too-early", + "(1,136): unexpected-end-tag-in-table-row", + "(1,141): unexpected-end-tag-implies-table-voodoo", + "(1,141): unexpected-end-tag-treated-as", + "(1,145): unexpected-end-tag-implies-table-voodoo", + "(1,145): unexpected-end-tag", + "(1,151): unexpected-end-tag-implies-table-voodoo", + "(1,151): unexpected-end-tag", + "(1,159): unexpected-end-tag-implies-table-voodoo", + "(1,159): unexpected-end-tag", + "(1,166): unexpected-end-tag-implies-table-voodoo", + "(1,166): unexpected-end-tag", + "(1,174): unexpected-end-tag-implies-table-voodoo", + "(1,174): unexpected-end-tag", + "(1,183): unexpected-end-tag-implies-table-voodoo", + "(1,183): unexpected-end-tag", + "(1,196): unexpected-end-tag", + "(1,201): unexpected-end-tag", + "(1,206): unexpected-end-tag", + "(1,214): unexpected-end-tag", + "(1,221): unexpected-end-tag", + "(1,228): unexpected-end-tag", + "(1,236): unexpected-end-tag", + "(1,241): unexpected-end-tag", + "(1,249): unexpected-end-tag", + "(1,255): unexpected-end-tag", + "(1,262): unexpected-end-tag", + "(1,269): unexpected-end-tag", + "(1,280): unexpected-end-tag", + "(1,290): unexpected-end-tag", + "(1,298): unexpected-end-tag", + "(1,307): unexpected-end-tag", + "(1,311): unexpected-end-tag", + "(1,316): unexpected-end-tag", + "(1,321): unexpected-end-tag", + "(1,331): unexpected-end-tag", + "(1,342): unexpected-end-tag", + "(1,350): unexpected-end-tag", + "(1,358): unexpected-end-tag", + "(1,366): unexpected-end-tag", + "(1,376): end-tag-too-early", + "(1,389): end-tag-too-early", + "(1,398): end-tag-too-early", + "(1,404): end-tag-too-early", + "(1,410): end-tag-too-early", + "(1,415): end-tag-too-early", + "(1,426): end-tag-too-early", + "(1,436): end-tag-too-early", + "(1,443): end-tag-too-early", + "(1,448): end-tag-too-early", + "(1,453): end-tag-too-early", + "(1,458): unexpected-end-tag", + "(1,465): unexpected-end-tag", + "(1,471): unexpected-end-tag", + "(1,478): unexpected-end-tag", + "(1,487): end-tag-too-early", + "(1,497): end-tag-too-early", + "(1,506): end-tag-too-early", + "(1,524): expected-eof-but-got-end-tag", + "(1,524): unexpected-end-tag", + "(1,531): unexpected-end-tag", + "(1,540): unexpected-end-tag", + "(1,548): unexpected-end-tag", + "(1,558): unexpected-end-tag", + "(1,568): unexpected-end-tag", + "(1,579): unexpected-end-tag", + "(1,590): unexpected-end-tag", + "(1,601): unexpected-end-tag", + "(1,610): unexpected-end-tag", + "(1,622): unexpected-end-tag", + "(1,633): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true, + "table": true, + "tbody": true, + "tr": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "p" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><br><table><tbody><tr></tr></tbody></table><p></p></body></html>", + "noQuirksBodyHtml": "<br><table><tbody><tr></tr></tbody></table><p></p>" + } + }, + { + "data": "<frameset>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,10): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + } + ], + "tests10.dat": [ + { + "data": "<!DOCTYPE html><svg></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<!DOCTYPE html><svg></svg><![CDATA[a]]>", + "errors": [ + "(1,28) expected-dashes-or-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "comment": "[CDATA[a]]" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg><!--[CDATA[a]]--></body></html>", + "noQuirksBodyHtml": "<svg></svg><!--[CDATA[a]]-->" + } + }, + { + "data": "<!DOCTYPE html><body><svg></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<!DOCTYPE html><body><select><svg></svg></select>", + "errors": [ + "(1,34) unexpected-start-tag-in-select", + "(1,40) unexpected-end-tag-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!DOCTYPE html><body><select><option><svg></svg></option></select>", + "errors": [ + "(1,42) unexpected-start-tag-in-select", + "(1,48) unexpected-end-tag-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><option></option></select>" + } + }, + { + "data": "<!DOCTYPE html><body><table><svg></svg></table>", + "errors": [ + "(1,33) foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg><table></table></body></html>", + "noQuirksBodyHtml": "<svg></svg><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>", + "errors": [ + "(1,33) foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g></svg><table></table></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g></svg><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table>", + "errors": [ + "(1,33) foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><table></table></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g></svg><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table>", + "errors": [ + "(1,40) foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "table": true, + "tbody": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g></svg><table><tbody></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table>", + "errors": [ + "(1,44) foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g></svg><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg g": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</p></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</p></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</p></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</p></caption></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux", + "errors": [ + "(1,65) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</p></caption></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><caption><svg><g>foo</g><g>bar</g><p>baz</p></svg></caption></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux", + "errors": [ + "(1,73) unexpected-end-tag", + "(1,73) expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + }, + { + "text": "baz" + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><svg><g>foo</g><g>bar</g>baz</svg></caption></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><caption><svg><g>foo</g><g>bar</g>baz</svg></caption></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux", + "errors": [ + "(1,43) foster-parenting-start-tag svg", + "(1,66) unexpected HTML-like start tag token in foreign content", + "(1,66) foster-parenting-start-tag", + "(1,67) foster-parenting-character", + "(1,68) foster-parenting-character", + "(1,69) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "p": true, + "table": true, + "colgroup": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><p>baz</p><table><colgroup></colgroup></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g><p>baz</p></svg><table><colgroup></colgroup></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux", + "errors": [ + "(1,49) unexpected-start-tag-in-select", + "(1,52) unexpected-start-tag-in-select", + "(1,59) unexpected-end-tag-in-select", + "(1,62) unexpected-start-tag-in-select", + "(1,69) unexpected-end-tag-in-select", + "(1,72) unexpected-start-tag-in-select", + "(1,83) unexpected-table-element-end-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "select": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "foobarbaz" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><select>foobarbaz</select></td></tr></tbody></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><select>foobarbaz</select></td></tr></tbody></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux", + "errors": [ + "(1,36) unexpected-start-tag-implies-table-voodoo", + "(1,41) unexpected-start-tag-in-select", + "(1,44) unexpected-start-tag-in-select", + "(1,51) unexpected-end-tag-in-select", + "(1,54) unexpected-start-tag-in-select", + "(1,61) unexpected-end-tag-in-select", + "(1,64) unexpected-start-tag-in-select", + "(1,75) unexpected-table-element-end-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "foobarbaz" + } + ] + }, + { + "tag": "table" + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select>foobarbaz</select><table></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<select>foobarbaz</select><table></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz", + "errors": [ + "(1,40) expected-eof-but-got-start-tag", + "(1,63) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><p>baz</p></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g><p>baz</p></svg>" + } + }, + { + "data": "<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz", + "errors": [ + "(1,33) unexpected-start-tag-after-body", + "(1,56) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><g>foo</g><g>bar</g></svg><p>baz</p></body></html>", + "noQuirksBodyHtml": "<svg><g>foo</g><g>bar</g><p>baz</p></svg>" + } + }, + { + "data": "<!DOCTYPE html><frameset><svg><g></g><g></g><p><span>", + "errors": [ + "(1,30) unexpected-start-tag-in-frameset", + "(1,33) unexpected-start-tag-in-frameset", + "(1,37) unexpected-end-tag-in-frameset", + "(1,40) unexpected-start-tag-in-frameset", + "(1,44) unexpected-end-tag-in-frameset", + "(1,47) unexpected-start-tag-in-frameset", + "(1,53) unexpected-start-tag-in-frameset", + "(1,53) eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg><g></g><g></g><p><span></span></p></svg>" + } + }, + { + "data": "<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>", + "errors": [ + "(1,41) unexpected-start-tag-after-frameset", + "(1,44) unexpected-start-tag-after-frameset", + "(1,48) unexpected-end-tag-after-frameset", + "(1,51) unexpected-start-tag-after-frameset", + "(1,55) unexpected-end-tag-after-frameset", + "(1,58) unexpected-start-tag-after-frameset", + "(1,64) unexpected-start-tag-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<svg><g></g><g></g><p><span></span></p></svg>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + } + ], + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\"><svg xlink:href=\"foo\"></svg></body></html>", + "noQuirksBodyHtml": "<svg xlink:href=\"foo\"></svg>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><svg><g xml:lang=\"en\" xlink:href=\"foo\"></g></svg></body></html>", + "noQuirksBodyHtml": "<svg><g xml:lang=\"en\" xlink:href=\"foo\"></g></svg>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><svg><g xml:lang=\"en\" xlink:href=\"foo\"></g></svg></body></html>", + "noQuirksBodyHtml": "<svg><g xml:lang=\"en\" xlink:href=\"foo\"></g></svg>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg g": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><svg><g xml:lang=\"en\" xlink:href=\"foo\"></g>bar</svg></body></html>", + "noQuirksBodyHtml": "<svg><g xml:lang=\"en\" xlink:href=\"foo\"></g>bar</svg>" + } + }, + { + "data": "<svg></path>", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,12) unexpected-end-tag", + "(1,12) unexpected-end-tag", + "(1,12) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<div><svg></div>a", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,16) unexpected-end-tag", + "(1,16) end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg></svg></div>a</body></html>", + "noQuirksBodyHtml": "<div><svg></svg></div>a" + } + }, + { + "data": "<div><svg><path></div>a", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,22) unexpected-end-tag", + "(1,22) end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true, + "svg path": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg><path></path></svg></div>a</body></html>", + "noQuirksBodyHtml": "<div><svg><path></path></svg></div>a" + } + }, + { + "data": "<div><svg><path></svg><path>", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,22) unexpected-end-tag", + "(1,28) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true, + "svg path": true, + "path": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + }, + { + "tag": "path" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg><path></path></svg><path></path></div></body></html>", + "noQuirksBodyHtml": "<div><svg><path></path></svg><path></path></div>" + } + }, + { + "data": "<div><svg><path><foreignObject><math></div>a", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,43) unexpected-end-tag", + "(1,43) end-tag-too-early", + "(1,44) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true, + "svg path": true, + "svg foreignObject": true, + "math math": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg><path><foreignObject><math>a</math></foreignObject></path></svg></div></body></html>", + "noQuirksBodyHtml": "<div><svg><path><foreignObject><math>a</math></foreignObject></path></svg></div>" + } + }, + { + "data": "<div><svg><path><foreignObject><p></div>a", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,40) end-tag-too-early", + "(1,41) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true, + "svg path": true, + "svg foreignObject": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg><path><foreignObject><p>a</p></foreignObject></path></svg></div></body></html>", + "noQuirksBodyHtml": "<div><svg><path><foreignObject><p>a</p></foreignObject></path></svg></div>" + } + }, + { + "data": "<!DOCTYPE html><svg><desc><div><svg><ul>a", + "errors": [ + "(1,40) unexpected-html-element-in-foreign-content", + "(1,41) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg desc": true, + "div": true, + "ul": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "ul", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><desc><div><svg></svg><ul>a</ul></div></desc></svg></body></html>", + "noQuirksBodyHtml": "<svg><desc><div><svg><ul>a</ul></svg></div></desc></svg>" + } + }, + { + "data": "<!DOCTYPE html><svg><desc><svg><ul>a", + "errors": [ + "(1,35) unexpected-html-element-in-foreign-content", + "(1,36) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg desc": true, + "ul": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "ul", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><desc><svg></svg><ul>a</ul></desc></svg></body></html>", + "noQuirksBodyHtml": "<svg><desc><svg><ul>a</ul></svg></desc></svg>" + } + }, + { + "data": "<!DOCTYPE html><p><svg><desc><p>", + "errors": [ + "(1,32) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "svg svg": true, + "svg desc": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><svg><desc><p></p></desc></svg></p></body></html>", + "noQuirksBodyHtml": "<p><svg><desc><p></p></desc></svg></p>" + } + }, + { + "data": "<!DOCTYPE html><p><svg><title><p>", + "errors": [ + "(1,33) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "svg svg": true, + "svg title": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><svg><title><p></p></title></svg></p></body></html>", + "noQuirksBodyHtml": "<p><svg><title><p></p></title></svg></p>" + } + }, + { + "data": "<div><svg><path><foreignObject><p></foreignObject><p>", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,50) unexpected-end-tag", + "(1,53) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "svg svg": true, + "svg path": true, + "svg foreignObject": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p" + }, + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><svg><path><foreignObject><p></p><p></p></foreignObject></path></svg></div></body></html>", + "noQuirksBodyHtml": "<div><svg><path><foreignObject><p></p><p></p></foreignObject></path></svg></div>" + } + }, + { + "data": "<math><mi><div><object><div><span></span></div></object></div></mi><mi>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,71) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "div": true, + "object": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "object", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mi><div><object><div><span></span></div></object></div></mi><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi><div><object><div><span></span></div></object></div></mi><mi></mi></math>" + } + }, + { + "data": "<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,83) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "svg svg": true, + "svg foreignObject": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi></mi></math>" + } + }, + { + "data": "<svg><script></script><path>", + "errors": [ + "(1,5) expected-doctype-but-got-start-tag", + "(1,28) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg script": true, + "svg path": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "script", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><script></script><path></path></svg></body></html>", + "noQuirksBodyHtml": "<svg><script></script><path></path></svg>" + } + }, + { + "data": "<table><svg></svg><tr>", + "errors": [ + "(1,7) expected-doctype-but-got-start-tag", + "(1,12) unexpected-start-tag-implies-table-voodoo", + "(1,22) eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<svg></svg><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<math><mi><mglyph>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,18) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "math mglyph": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mi><mglyph></mglyph></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi><mglyph></mglyph></mi></math>" + } + }, + { + "data": "<math><mi><malignmark>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,22) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "math malignmark": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mi><malignmark></malignmark></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi><malignmark></malignmark></mi></math>" + } + }, + { + "data": "<math><mo><mglyph>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,18) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mo": true, + "math mglyph": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mo><mglyph></mglyph></mo></math></body></html>", + "noQuirksBodyHtml": "<math><mo><mglyph></mglyph></mo></math>" + } + }, + { + "data": "<math><mo><malignmark>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,22) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mo": true, + "math malignmark": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mo><malignmark></malignmark></mo></math></body></html>", + "noQuirksBodyHtml": "<math><mo><malignmark></malignmark></mo></math>" + } + }, + { + "data": "<math><mn><mglyph>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,18) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mn": true, + "math mglyph": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mn><mglyph></mglyph></mn></math></body></html>", + "noQuirksBodyHtml": "<math><mn><mglyph></mglyph></mn></math>" + } + }, + { + "data": "<math><mn><malignmark>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,22) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mn": true, + "math malignmark": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mn><malignmark></malignmark></mn></math></body></html>", + "noQuirksBodyHtml": "<math><mn><malignmark></malignmark></mn></math>" + } + }, + { + "data": "<math><ms><mglyph>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,18) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math ms": true, + "math mglyph": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "ms", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><ms><mglyph></mglyph></ms></math></body></html>", + "noQuirksBodyHtml": "<math><ms><mglyph></mglyph></ms></math>" + } + }, + { + "data": "<math><ms><malignmark>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,22) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math ms": true, + "math malignmark": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "ms", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><ms><malignmark></malignmark></ms></math></body></html>", + "noQuirksBodyHtml": "<math><ms><malignmark></malignmark></ms></math>" + } + }, + { + "data": "<math><mtext><mglyph>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,21) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mtext": true, + "math mglyph": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mtext><mglyph></mglyph></mtext></math></body></html>", + "noQuirksBodyHtml": "<math><mtext><mglyph></mglyph></mtext></math>" + } + }, + { + "data": "<math><mtext><malignmark>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,25) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mtext": true, + "math malignmark": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "malignmark", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mtext><malignmark></malignmark></mtext></math></body></html>", + "noQuirksBodyHtml": "<math><mtext><malignmark></malignmark></mtext></math>" + } + }, + { + "data": "<math><annotation-xml><svg></svg></annotation-xml><mi>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,54) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "svg svg": true, + "math mi": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml><svg></svg></annotation-xml><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml><svg></svg></annotation-xml><mi></mi></math>" + } + }, + { + "data": "<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,144) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "svg svg": true, + "svg foreignObject": true, + "div": true, + "math mi": true, + "span": true, + "svg path": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + }, + { + "tag": "span" + } + ] + } + ] + }, + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi></mi></math>" + } + }, + { + "data": "<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi>", + "errors": [ + "(1,6) expected-doctype-but-got-start-tag", + "(1,153) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "svg svg": true, + "svg foreignObject": true, + "math mi": true, + "math mo": true, + "span": true, + "svg path": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + }, + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + }, + { + "tag": "span" + } + ] + }, + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi></mi></math>" + } + } + ], + "tests11.dat": [ + { + "data": "<!DOCTYPE html><body><svg attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' diffuseConstant='' edgeMode='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "attributeName", + "value": "" + }, + { + "name": "attributeType", + "value": "" + }, + { + "name": "baseFrequency", + "value": "" + }, + { + "name": "baseProfile", + "value": "" + }, + { + "name": "calcMode", + "value": "" + }, + { + "name": "clipPathUnits", + "value": "" + }, + { + "name": "diffuseConstant", + "value": "" + }, + { + "name": "edgeMode", + "value": "" + }, + { + "name": "filterUnits", + "value": "" + }, + { + "name": "glyphRef", + "value": "" + }, + { + "name": "gradientTransform", + "value": "" + }, + { + "name": "gradientUnits", + "value": "" + }, + { + "name": "kernelMatrix", + "value": "" + }, + { + "name": "kernelUnitLength", + "value": "" + }, + { + "name": "keyPoints", + "value": "" + }, + { + "name": "keySplines", + "value": "" + }, + { + "name": "keyTimes", + "value": "" + }, + { + "name": "lengthAdjust", + "value": "" + }, + { + "name": "limitingConeAngle", + "value": "" + }, + { + "name": "markerHeight", + "value": "" + }, + { + "name": "markerUnits", + "value": "" + }, + { + "name": "markerWidth", + "value": "" + }, + { + "name": "maskContentUnits", + "value": "" + }, + { + "name": "maskUnits", + "value": "" + }, + { + "name": "numOctaves", + "value": "" + }, + { + "name": "pathLength", + "value": "" + }, + { + "name": "patternContentUnits", + "value": "" + }, + { + "name": "patternTransform", + "value": "" + }, + { + "name": "patternUnits", + "value": "" + }, + { + "name": "pointsAtX", + "value": "" + }, + { + "name": "pointsAtY", + "value": "" + }, + { + "name": "pointsAtZ", + "value": "" + }, + { + "name": "preserveAlpha", + "value": "" + }, + { + "name": "preserveAspectRatio", + "value": "" + }, + { + "name": "primitiveUnits", + "value": "" + }, + { + "name": "refX", + "value": "" + }, + { + "name": "refY", + "value": "" + }, + { + "name": "repeatCount", + "value": "" + }, + { + "name": "repeatDur", + "value": "" + }, + { + "name": "requiredExtensions", + "value": "" + }, + { + "name": "requiredFeatures", + "value": "" + }, + { + "name": "specularConstant", + "value": "" + }, + { + "name": "specularExponent", + "value": "" + }, + { + "name": "spreadMethod", + "value": "" + }, + { + "name": "startOffset", + "value": "" + }, + { + "name": "stdDeviation", + "value": "" + }, + { + "name": "stitchTiles", + "value": "" + }, + { + "name": "surfaceScale", + "value": "" + }, + { + "name": "systemLanguage", + "value": "" + }, + { + "name": "tableValues", + "value": "" + }, + { + "name": "targetX", + "value": "" + }, + { + "name": "targetY", + "value": "" + }, + { + "name": "textLength", + "value": "" + }, + { + "name": "viewBox", + "value": "" + }, + { + "name": "viewTarget", + "value": "" + }, + { + "name": "xChannelSelector", + "value": "" + }, + { + "name": "yChannelSelector", + "value": "" + }, + { + "name": "zoomAndPan", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg></body></html>", + "noQuirksBodyHtml": "<svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg>" + } + }, + { + "data": "<!DOCTYPE html><BODY><SVG ATTRIBUTENAME='' ATTRIBUTETYPE='' BASEFREQUENCY='' BASEPROFILE='' CALCMODE='' CLIPPATHUNITS='' DIFFUSECONSTANT='' EDGEMODE='' FILTERUNITS='' GLYPHREF='' GRADIENTTRANSFORM='' GRADIENTUNITS='' KERNELMATRIX='' KERNELUNITLENGTH='' KEYPOINTS='' KEYSPLINES='' KEYTIMES='' LENGTHADJUST='' LIMITINGCONEANGLE='' MARKERHEIGHT='' MARKERUNITS='' MARKERWIDTH='' MASKCONTENTUNITS='' MASKUNITS='' NUMOCTAVES='' PATHLENGTH='' PATTERNCONTENTUNITS='' PATTERNTRANSFORM='' PATTERNUNITS='' POINTSATX='' POINTSATY='' POINTSATZ='' PRESERVEALPHA='' PRESERVEASPECTRATIO='' PRIMITIVEUNITS='' REFX='' REFY='' REPEATCOUNT='' REPEATDUR='' REQUIREDEXTENSIONS='' REQUIREDFEATURES='' SPECULARCONSTANT='' SPECULAREXPONENT='' SPREADMETHOD='' STARTOFFSET='' STDDEVIATION='' STITCHTILES='' SURFACESCALE='' SYSTEMLANGUAGE='' TABLEVALUES='' TARGETX='' TARGETY='' TEXTLENGTH='' VIEWBOX='' VIEWTARGET='' XCHANNELSELECTOR='' YCHANNELSELECTOR='' ZOOMANDPAN=''></SVG>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "attributeName", + "value": "" + }, + { + "name": "attributeType", + "value": "" + }, + { + "name": "baseFrequency", + "value": "" + }, + { + "name": "baseProfile", + "value": "" + }, + { + "name": "calcMode", + "value": "" + }, + { + "name": "clipPathUnits", + "value": "" + }, + { + "name": "diffuseConstant", + "value": "" + }, + { + "name": "edgeMode", + "value": "" + }, + { + "name": "filterUnits", + "value": "" + }, + { + "name": "glyphRef", + "value": "" + }, + { + "name": "gradientTransform", + "value": "" + }, + { + "name": "gradientUnits", + "value": "" + }, + { + "name": "kernelMatrix", + "value": "" + }, + { + "name": "kernelUnitLength", + "value": "" + }, + { + "name": "keyPoints", + "value": "" + }, + { + "name": "keySplines", + "value": "" + }, + { + "name": "keyTimes", + "value": "" + }, + { + "name": "lengthAdjust", + "value": "" + }, + { + "name": "limitingConeAngle", + "value": "" + }, + { + "name": "markerHeight", + "value": "" + }, + { + "name": "markerUnits", + "value": "" + }, + { + "name": "markerWidth", + "value": "" + }, + { + "name": "maskContentUnits", + "value": "" + }, + { + "name": "maskUnits", + "value": "" + }, + { + "name": "numOctaves", + "value": "" + }, + { + "name": "pathLength", + "value": "" + }, + { + "name": "patternContentUnits", + "value": "" + }, + { + "name": "patternTransform", + "value": "" + }, + { + "name": "patternUnits", + "value": "" + }, + { + "name": "pointsAtX", + "value": "" + }, + { + "name": "pointsAtY", + "value": "" + }, + { + "name": "pointsAtZ", + "value": "" + }, + { + "name": "preserveAlpha", + "value": "" + }, + { + "name": "preserveAspectRatio", + "value": "" + }, + { + "name": "primitiveUnits", + "value": "" + }, + { + "name": "refX", + "value": "" + }, + { + "name": "refY", + "value": "" + }, + { + "name": "repeatCount", + "value": "" + }, + { + "name": "repeatDur", + "value": "" + }, + { + "name": "requiredExtensions", + "value": "" + }, + { + "name": "requiredFeatures", + "value": "" + }, + { + "name": "specularConstant", + "value": "" + }, + { + "name": "specularExponent", + "value": "" + }, + { + "name": "spreadMethod", + "value": "" + }, + { + "name": "startOffset", + "value": "" + }, + { + "name": "stdDeviation", + "value": "" + }, + { + "name": "stitchTiles", + "value": "" + }, + { + "name": "surfaceScale", + "value": "" + }, + { + "name": "systemLanguage", + "value": "" + }, + { + "name": "tableValues", + "value": "" + }, + { + "name": "targetX", + "value": "" + }, + { + "name": "targetY", + "value": "" + }, + { + "name": "textLength", + "value": "" + }, + { + "name": "viewBox", + "value": "" + }, + { + "name": "viewTarget", + "value": "" + }, + { + "name": "xChannelSelector", + "value": "" + }, + { + "name": "yChannelSelector", + "value": "" + }, + { + "name": "zoomAndPan", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg></body></html>", + "noQuirksBodyHtml": "<svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg>" + } + }, + { + "data": "<!DOCTYPE html><body><svg attributename='' attributetype='' basefrequency='' baseprofile='' calcmode='' clippathunits='' diffuseconstant='' edgemode='' filterunits='' filterres='' glyphref='' gradienttransform='' gradientunits='' kernelmatrix='' kernelunitlength='' keypoints='' keysplines='' keytimes='' lengthadjust='' limitingconeangle='' markerheight='' markerunits='' markerwidth='' maskcontentunits='' maskunits='' numoctaves='' pathlength='' patterncontentunits='' patterntransform='' patternunits='' pointsatx='' pointsaty='' pointsatz='' preservealpha='' preserveaspectratio='' primitiveunits='' refx='' refy='' repeatcount='' repeatdur='' requiredextensions='' requiredfeatures='' specularconstant='' specularexponent='' spreadmethod='' startoffset='' stddeviation='' stitchtiles='' surfacescale='' systemlanguage='' tablevalues='' targetx='' targety='' textlength='' viewbox='' viewtarget='' xchannelselector='' ychannelselector='' zoomandpan=''></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "attrs": [ + { + "name": "attributeName", + "value": "" + }, + { + "name": "attributeType", + "value": "" + }, + { + "name": "baseFrequency", + "value": "" + }, + { + "name": "baseProfile", + "value": "" + }, + { + "name": "calcMode", + "value": "" + }, + { + "name": "clipPathUnits", + "value": "" + }, + { + "name": "diffuseConstant", + "value": "" + }, + { + "name": "edgeMode", + "value": "" + }, + { + "name": "filterUnits", + "value": "" + }, + { + "name": "filterres", + "value": "" + }, + { + "name": "glyphRef", + "value": "" + }, + { + "name": "gradientTransform", + "value": "" + }, + { + "name": "gradientUnits", + "value": "" + }, + { + "name": "kernelMatrix", + "value": "" + }, + { + "name": "kernelUnitLength", + "value": "" + }, + { + "name": "keyPoints", + "value": "" + }, + { + "name": "keySplines", + "value": "" + }, + { + "name": "keyTimes", + "value": "" + }, + { + "name": "lengthAdjust", + "value": "" + }, + { + "name": "limitingConeAngle", + "value": "" + }, + { + "name": "markerHeight", + "value": "" + }, + { + "name": "markerUnits", + "value": "" + }, + { + "name": "markerWidth", + "value": "" + }, + { + "name": "maskContentUnits", + "value": "" + }, + { + "name": "maskUnits", + "value": "" + }, + { + "name": "numOctaves", + "value": "" + }, + { + "name": "pathLength", + "value": "" + }, + { + "name": "patternContentUnits", + "value": "" + }, + { + "name": "patternTransform", + "value": "" + }, + { + "name": "patternUnits", + "value": "" + }, + { + "name": "pointsAtX", + "value": "" + }, + { + "name": "pointsAtY", + "value": "" + }, + { + "name": "pointsAtZ", + "value": "" + }, + { + "name": "preserveAlpha", + "value": "" + }, + { + "name": "preserveAspectRatio", + "value": "" + }, + { + "name": "primitiveUnits", + "value": "" + }, + { + "name": "refX", + "value": "" + }, + { + "name": "refY", + "value": "" + }, + { + "name": "repeatCount", + "value": "" + }, + { + "name": "repeatDur", + "value": "" + }, + { + "name": "requiredExtensions", + "value": "" + }, + { + "name": "requiredFeatures", + "value": "" + }, + { + "name": "specularConstant", + "value": "" + }, + { + "name": "specularExponent", + "value": "" + }, + { + "name": "spreadMethod", + "value": "" + }, + { + "name": "startOffset", + "value": "" + }, + { + "name": "stdDeviation", + "value": "" + }, + { + "name": "stitchTiles", + "value": "" + }, + { + "name": "surfaceScale", + "value": "" + }, + { + "name": "systemLanguage", + "value": "" + }, + { + "name": "tableValues", + "value": "" + }, + { + "name": "targetX", + "value": "" + }, + { + "name": "targetY", + "value": "" + }, + { + "name": "textLength", + "value": "" + }, + { + "name": "viewBox", + "value": "" + }, + { + "name": "viewTarget", + "value": "" + }, + { + "name": "xChannelSelector", + "value": "" + }, + { + "name": "yChannelSelector", + "value": "" + }, + { + "name": "zoomAndPan", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" filterres=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg></body></html>", + "noQuirksBodyHtml": "<svg attributeName=\"\" attributeType=\"\" baseFrequency=\"\" baseProfile=\"\" calcMode=\"\" clipPathUnits=\"\" diffuseConstant=\"\" edgeMode=\"\" filterUnits=\"\" filterres=\"\" glyphRef=\"\" gradientTransform=\"\" gradientUnits=\"\" kernelMatrix=\"\" kernelUnitLength=\"\" keyPoints=\"\" keySplines=\"\" keyTimes=\"\" lengthAdjust=\"\" limitingConeAngle=\"\" markerHeight=\"\" markerUnits=\"\" markerWidth=\"\" maskContentUnits=\"\" maskUnits=\"\" numOctaves=\"\" pathLength=\"\" patternContentUnits=\"\" patternTransform=\"\" patternUnits=\"\" pointsAtX=\"\" pointsAtY=\"\" pointsAtZ=\"\" preserveAlpha=\"\" preserveAspectRatio=\"\" primitiveUnits=\"\" refX=\"\" refY=\"\" repeatCount=\"\" repeatDur=\"\" requiredExtensions=\"\" requiredFeatures=\"\" specularConstant=\"\" specularExponent=\"\" spreadMethod=\"\" startOffset=\"\" stdDeviation=\"\" stitchTiles=\"\" surfaceScale=\"\" systemLanguage=\"\" tableValues=\"\" targetX=\"\" targetY=\"\" textLength=\"\" viewBox=\"\" viewTarget=\"\" xChannelSelector=\"\" yChannelSelector=\"\" zoomAndPan=\"\"></svg>" + } + }, + { + "data": "<!DOCTYPE html><body><math attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' diffuseConstant='' edgeMode='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "attributename", + "value": "" + }, + { + "name": "attributetype", + "value": "" + }, + { + "name": "basefrequency", + "value": "" + }, + { + "name": "baseprofile", + "value": "" + }, + { + "name": "calcmode", + "value": "" + }, + { + "name": "clippathunits", + "value": "" + }, + { + "name": "diffuseconstant", + "value": "" + }, + { + "name": "edgemode", + "value": "" + }, + { + "name": "filterunits", + "value": "" + }, + { + "name": "glyphref", + "value": "" + }, + { + "name": "gradienttransform", + "value": "" + }, + { + "name": "gradientunits", + "value": "" + }, + { + "name": "kernelmatrix", + "value": "" + }, + { + "name": "kernelunitlength", + "value": "" + }, + { + "name": "keypoints", + "value": "" + }, + { + "name": "keysplines", + "value": "" + }, + { + "name": "keytimes", + "value": "" + }, + { + "name": "lengthadjust", + "value": "" + }, + { + "name": "limitingconeangle", + "value": "" + }, + { + "name": "markerheight", + "value": "" + }, + { + "name": "markerunits", + "value": "" + }, + { + "name": "markerwidth", + "value": "" + }, + { + "name": "maskcontentunits", + "value": "" + }, + { + "name": "maskunits", + "value": "" + }, + { + "name": "numoctaves", + "value": "" + }, + { + "name": "pathlength", + "value": "" + }, + { + "name": "patterncontentunits", + "value": "" + }, + { + "name": "patterntransform", + "value": "" + }, + { + "name": "patternunits", + "value": "" + }, + { + "name": "pointsatx", + "value": "" + }, + { + "name": "pointsaty", + "value": "" + }, + { + "name": "pointsatz", + "value": "" + }, + { + "name": "preservealpha", + "value": "" + }, + { + "name": "preserveaspectratio", + "value": "" + }, + { + "name": "primitiveunits", + "value": "" + }, + { + "name": "refx", + "value": "" + }, + { + "name": "refy", + "value": "" + }, + { + "name": "repeatcount", + "value": "" + }, + { + "name": "repeatdur", + "value": "" + }, + { + "name": "requiredextensions", + "value": "" + }, + { + "name": "requiredfeatures", + "value": "" + }, + { + "name": "specularconstant", + "value": "" + }, + { + "name": "specularexponent", + "value": "" + }, + { + "name": "spreadmethod", + "value": "" + }, + { + "name": "startoffset", + "value": "" + }, + { + "name": "stddeviation", + "value": "" + }, + { + "name": "stitchtiles", + "value": "" + }, + { + "name": "surfacescale", + "value": "" + }, + { + "name": "systemlanguage", + "value": "" + }, + { + "name": "tablevalues", + "value": "" + }, + { + "name": "targetx", + "value": "" + }, + { + "name": "targety", + "value": "" + }, + { + "name": "textlength", + "value": "" + }, + { + "name": "viewbox", + "value": "" + }, + { + "name": "viewtarget", + "value": "" + }, + { + "name": "xchannelselector", + "value": "" + }, + { + "name": "ychannelselector", + "value": "" + }, + { + "name": "zoomandpan", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math attributename=\"\" attributetype=\"\" basefrequency=\"\" baseprofile=\"\" calcmode=\"\" clippathunits=\"\" diffuseconstant=\"\" edgemode=\"\" filterunits=\"\" glyphref=\"\" gradienttransform=\"\" gradientunits=\"\" kernelmatrix=\"\" kernelunitlength=\"\" keypoints=\"\" keysplines=\"\" keytimes=\"\" lengthadjust=\"\" limitingconeangle=\"\" markerheight=\"\" markerunits=\"\" markerwidth=\"\" maskcontentunits=\"\" maskunits=\"\" numoctaves=\"\" pathlength=\"\" patterncontentunits=\"\" patterntransform=\"\" patternunits=\"\" pointsatx=\"\" pointsaty=\"\" pointsatz=\"\" preservealpha=\"\" preserveaspectratio=\"\" primitiveunits=\"\" refx=\"\" refy=\"\" repeatcount=\"\" repeatdur=\"\" requiredextensions=\"\" requiredfeatures=\"\" specularconstant=\"\" specularexponent=\"\" spreadmethod=\"\" startoffset=\"\" stddeviation=\"\" stitchtiles=\"\" surfacescale=\"\" systemlanguage=\"\" tablevalues=\"\" targetx=\"\" targety=\"\" textlength=\"\" viewbox=\"\" viewtarget=\"\" xchannelselector=\"\" ychannelselector=\"\" zoomandpan=\"\"></math></body></html>", + "noQuirksBodyHtml": "<math attributename=\"\" attributetype=\"\" basefrequency=\"\" baseprofile=\"\" calcmode=\"\" clippathunits=\"\" diffuseconstant=\"\" edgemode=\"\" filterunits=\"\" glyphref=\"\" gradienttransform=\"\" gradientunits=\"\" kernelmatrix=\"\" kernelunitlength=\"\" keypoints=\"\" keysplines=\"\" keytimes=\"\" lengthadjust=\"\" limitingconeangle=\"\" markerheight=\"\" markerunits=\"\" markerwidth=\"\" maskcontentunits=\"\" maskunits=\"\" numoctaves=\"\" pathlength=\"\" patterncontentunits=\"\" patterntransform=\"\" patternunits=\"\" pointsatx=\"\" pointsaty=\"\" pointsatz=\"\" preservealpha=\"\" preserveaspectratio=\"\" primitiveunits=\"\" refx=\"\" refy=\"\" repeatcount=\"\" repeatdur=\"\" requiredextensions=\"\" requiredfeatures=\"\" specularconstant=\"\" specularexponent=\"\" spreadmethod=\"\" startoffset=\"\" stddeviation=\"\" stitchtiles=\"\" surfacescale=\"\" systemlanguage=\"\" tablevalues=\"\" targetx=\"\" targety=\"\" textlength=\"\" viewbox=\"\" viewtarget=\"\" xchannelselector=\"\" ychannelselector=\"\" zoomandpan=\"\"></math>" + } + }, + { + "data": "<!DOCTYPE html><body><svg><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg altGlyph": true, + "svg altGlyphDef": true, + "svg altGlyphItem": true, + "svg animateColor": true, + "svg animateMotion": true, + "svg animateTransform": true, + "svg clipPath": true, + "svg feBlend": true, + "svg feColorMatrix": true, + "svg feComponentTransfer": true, + "svg feComposite": true, + "svg feConvolveMatrix": true, + "svg feDiffuseLighting": true, + "svg feDisplacementMap": true, + "svg feDistantLight": true, + "svg feFlood": true, + "svg feFuncA": true, + "svg feFuncB": true, + "svg feFuncG": true, + "svg feFuncR": true, + "svg feGaussianBlur": true, + "svg feImage": true, + "svg feMerge": true, + "svg feMergeNode": true, + "svg feMorphology": true, + "svg feOffset": true, + "svg fePointLight": true, + "svg feSpecularLighting": true, + "svg feSpotLight": true, + "svg feTile": true, + "svg feTurbulence": true, + "svg foreignObject": true, + "svg glyphRef": true, + "svg linearGradient": true, + "svg radialGradient": true, + "svg textPath": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "altGlyph", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphDef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphItem", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateColor", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateMotion", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateTransform", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "clipPath", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feBlend", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feColorMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComponentTransfer", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComposite", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feConvolveMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDiffuseLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDisplacementMap", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDistantLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFlood", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncA", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncB", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncG", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncR", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feGaussianBlur", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feImage", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMerge", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMergeNode", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMorphology", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feOffset", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "fePointLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpecularLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpotLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTile", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTurbulence", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "glyphRef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "linearGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "radialGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "textPath", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg></body></html>", + "noQuirksBodyHtml": "<svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg>" + } + }, + { + "data": "<!DOCTYPE html><body><svg><altglyph /><altglyphdef /><altglyphitem /><animatecolor /><animatemotion /><animatetransform /><clippath /><feblend /><fecolormatrix /><fecomponenttransfer /><fecomposite /><feconvolvematrix /><fediffuselighting /><fedisplacementmap /><fedistantlight /><feflood /><fefunca /><fefuncb /><fefuncg /><fefuncr /><fegaussianblur /><feimage /><femerge /><femergenode /><femorphology /><feoffset /><fepointlight /><fespecularlighting /><fespotlight /><fetile /><feturbulence /><foreignobject /><glyphref /><lineargradient /><radialgradient /><textpath /></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg altGlyph": true, + "svg altGlyphDef": true, + "svg altGlyphItem": true, + "svg animateColor": true, + "svg animateMotion": true, + "svg animateTransform": true, + "svg clipPath": true, + "svg feBlend": true, + "svg feColorMatrix": true, + "svg feComponentTransfer": true, + "svg feComposite": true, + "svg feConvolveMatrix": true, + "svg feDiffuseLighting": true, + "svg feDisplacementMap": true, + "svg feDistantLight": true, + "svg feFlood": true, + "svg feFuncA": true, + "svg feFuncB": true, + "svg feFuncG": true, + "svg feFuncR": true, + "svg feGaussianBlur": true, + "svg feImage": true, + "svg feMerge": true, + "svg feMergeNode": true, + "svg feMorphology": true, + "svg feOffset": true, + "svg fePointLight": true, + "svg feSpecularLighting": true, + "svg feSpotLight": true, + "svg feTile": true, + "svg feTurbulence": true, + "svg foreignObject": true, + "svg glyphRef": true, + "svg linearGradient": true, + "svg radialGradient": true, + "svg textPath": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "altGlyph", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphDef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphItem", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateColor", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateMotion", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateTransform", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "clipPath", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feBlend", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feColorMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComponentTransfer", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComposite", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feConvolveMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDiffuseLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDisplacementMap", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDistantLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFlood", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncA", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncB", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncG", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncR", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feGaussianBlur", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feImage", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMerge", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMergeNode", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMorphology", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feOffset", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "fePointLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpecularLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpotLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTile", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTurbulence", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "glyphRef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "linearGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "radialGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "textPath", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg></body></html>", + "noQuirksBodyHtml": "<svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg>" + } + }, + { + "data": "<!DOCTYPE html><BODY><SVG><ALTGLYPH /><ALTGLYPHDEF /><ALTGLYPHITEM /><ANIMATECOLOR /><ANIMATEMOTION /><ANIMATETRANSFORM /><CLIPPATH /><FEBLEND /><FECOLORMATRIX /><FECOMPONENTTRANSFER /><FECOMPOSITE /><FECONVOLVEMATRIX /><FEDIFFUSELIGHTING /><FEDISPLACEMENTMAP /><FEDISTANTLIGHT /><FEFLOOD /><FEFUNCA /><FEFUNCB /><FEFUNCG /><FEFUNCR /><FEGAUSSIANBLUR /><FEIMAGE /><FEMERGE /><FEMERGENODE /><FEMORPHOLOGY /><FEOFFSET /><FEPOINTLIGHT /><FESPECULARLIGHTING /><FESPOTLIGHT /><FETILE /><FETURBULENCE /><FOREIGNOBJECT /><GLYPHREF /><LINEARGRADIENT /><RADIALGRADIENT /><TEXTPATH /></SVG>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg altGlyph": true, + "svg altGlyphDef": true, + "svg altGlyphItem": true, + "svg animateColor": true, + "svg animateMotion": true, + "svg animateTransform": true, + "svg clipPath": true, + "svg feBlend": true, + "svg feColorMatrix": true, + "svg feComponentTransfer": true, + "svg feComposite": true, + "svg feConvolveMatrix": true, + "svg feDiffuseLighting": true, + "svg feDisplacementMap": true, + "svg feDistantLight": true, + "svg feFlood": true, + "svg feFuncA": true, + "svg feFuncB": true, + "svg feFuncG": true, + "svg feFuncR": true, + "svg feGaussianBlur": true, + "svg feImage": true, + "svg feMerge": true, + "svg feMergeNode": true, + "svg feMorphology": true, + "svg feOffset": true, + "svg fePointLight": true, + "svg feSpecularLighting": true, + "svg feSpotLight": true, + "svg feTile": true, + "svg feTurbulence": true, + "svg foreignObject": true, + "svg glyphRef": true, + "svg linearGradient": true, + "svg radialGradient": true, + "svg textPath": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "altGlyph", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphDef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "altGlyphItem", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateColor", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateMotion", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "animateTransform", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "clipPath", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feBlend", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feColorMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComponentTransfer", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feComposite", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feConvolveMatrix", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDiffuseLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDisplacementMap", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feDistantLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFlood", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncA", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncB", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncG", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feFuncR", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feGaussianBlur", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feImage", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMerge", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMergeNode", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feMorphology", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feOffset", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "fePointLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpecularLighting", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feSpotLight", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTile", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "feTurbulence", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "glyphRef", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "linearGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "radialGradient", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "textPath", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg></body></html>", + "noQuirksBodyHtml": "<svg><altGlyph></altGlyph><altGlyphDef></altGlyphDef><altGlyphItem></altGlyphItem><animateColor></animateColor><animateMotion></animateMotion><animateTransform></animateTransform><clipPath></clipPath><feBlend></feBlend><feColorMatrix></feColorMatrix><feComponentTransfer></feComponentTransfer><feComposite></feComposite><feConvolveMatrix></feConvolveMatrix><feDiffuseLighting></feDiffuseLighting><feDisplacementMap></feDisplacementMap><feDistantLight></feDistantLight><feFlood></feFlood><feFuncA></feFuncA><feFuncB></feFuncB><feFuncG></feFuncG><feFuncR></feFuncR><feGaussianBlur></feGaussianBlur><feImage></feImage><feMerge></feMerge><feMergeNode></feMergeNode><feMorphology></feMorphology><feOffset></feOffset><fePointLight></fePointLight><feSpecularLighting></feSpecularLighting><feSpotLight></feSpotLight><feTile></feTile><feTurbulence></feTurbulence><foreignObject></foreignObject><glyphRef></glyphRef><linearGradient></linearGradient><radialGradient></radialGradient><textPath></textPath></svg>" + } + }, + { + "data": "<!DOCTYPE html><body><math><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math altglyph": true, + "math altglyphdef": true, + "math altglyphitem": true, + "math animatecolor": true, + "math animatemotion": true, + "math animatetransform": true, + "math clippath": true, + "math feblend": true, + "math fecolormatrix": true, + "math fecomponenttransfer": true, + "math fecomposite": true, + "math feconvolvematrix": true, + "math fediffuselighting": true, + "math fedisplacementmap": true, + "math fedistantlight": true, + "math feflood": true, + "math fefunca": true, + "math fefuncb": true, + "math fefuncg": true, + "math fefuncr": true, + "math fegaussianblur": true, + "math feimage": true, + "math femerge": true, + "math femergenode": true, + "math femorphology": true, + "math feoffset": true, + "math fepointlight": true, + "math fespecularlighting": true, + "math fespotlight": true, + "math fetile": true, + "math feturbulence": true, + "math foreignobject": true, + "math glyphref": true, + "math lineargradient": true, + "math radialgradient": true, + "math textpath": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "altglyph", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "altglyphdef", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "altglyphitem", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "animatecolor", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "animatemotion", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "animatetransform", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "clippath", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feblend", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fecolormatrix", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fecomponenttransfer", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fecomposite", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feconvolvematrix", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fediffuselighting", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fedisplacementmap", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fedistantlight", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feflood", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fefunca", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fefuncb", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fefuncg", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fefuncr", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fegaussianblur", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feimage", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "femerge", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "femergenode", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "femorphology", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feoffset", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fepointlight", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fespecularlighting", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fespotlight", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "fetile", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "feturbulence", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "foreignobject", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "glyphref", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "lineargradient", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "radialgradient", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "textpath", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><altglyph></altglyph><altglyphdef></altglyphdef><altglyphitem></altglyphitem><animatecolor></animatecolor><animatemotion></animatemotion><animatetransform></animatetransform><clippath></clippath><feblend></feblend><fecolormatrix></fecolormatrix><fecomponenttransfer></fecomponenttransfer><fecomposite></fecomposite><feconvolvematrix></feconvolvematrix><fediffuselighting></fediffuselighting><fedisplacementmap></fedisplacementmap><fedistantlight></fedistantlight><feflood></feflood><fefunca></fefunca><fefuncb></fefuncb><fefuncg></fefuncg><fefuncr></fefuncr><fegaussianblur></fegaussianblur><feimage></feimage><femerge></femerge><femergenode></femergenode><femorphology></femorphology><feoffset></feoffset><fepointlight></fepointlight><fespecularlighting></fespecularlighting><fespotlight></fespotlight><fetile></fetile><feturbulence></feturbulence><foreignobject></foreignobject><glyphref></glyphref><lineargradient></lineargradient><radialgradient></radialgradient><textpath></textpath></math></body></html>", + "noQuirksBodyHtml": "<math><altglyph></altglyph><altglyphdef></altglyphdef><altglyphitem></altglyphitem><animatecolor></animatecolor><animatemotion></animatemotion><animatetransform></animatetransform><clippath></clippath><feblend></feblend><fecolormatrix></fecolormatrix><fecomponenttransfer></fecomponenttransfer><fecomposite></fecomposite><feconvolvematrix></feconvolvematrix><fediffuselighting></fediffuselighting><fedisplacementmap></fedisplacementmap><fedistantlight></fedistantlight><feflood></feflood><fefunca></fefunca><fefuncb></fefuncb><fefuncg></fefuncg><fefuncr></fefuncr><fegaussianblur></fegaussianblur><feimage></feimage><femerge></femerge><femergenode></femergenode><femorphology></femorphology><feoffset></feoffset><fepointlight></fepointlight><fespecularlighting></fespecularlighting><fespotlight></fespotlight><fetile></fetile><feturbulence></feturbulence><foreignobject></foreignobject><glyphref></glyphref><lineargradient></lineargradient><radialgradient></radialgradient><textpath></textpath></math>" + } + }, + { + "data": "<!DOCTYPE html><body><svg><solidColor /></svg>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg solidcolor": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "solidcolor", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><solidcolor></solidcolor></svg></body></html>", + "noQuirksBodyHtml": "<svg><solidcolor></solidcolor></svg>" + } + } + ], + "tests12.dat": [ + { + "data": "<!DOCTYPE html><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mtext": true, + "i": true, + "math annotation-xml": true, + "svg svg": true, + "svg desc": true, + "b": true, + "svg g": true, + "svg foreignObject": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "img": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "foo" + }, + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "baz" + } + ] + } + ] + }, + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "eggs" + } + ] + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "spam" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "img" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><p>spam</p><table><tbody><tr><td><img></td></tr></tbody></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar</p></body></html>", + "noQuirksBodyHtml": "<p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><p>spam</p><table><tbody><tr><td><img></td></tr></tbody></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar</p>" + } + }, + { + "data": "<!DOCTYPE html><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mtext": true, + "i": true, + "math annotation-xml": true, + "svg svg": true, + "svg desc": true, + "b": true, + "svg g": true, + "svg foreignObject": true, + "p": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "img": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "foo" + }, + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "baz" + } + ] + } + ] + }, + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "eggs" + } + ] + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "spam" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "img" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "g", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><p>spam</p><table><tbody><tr><td><img></td></tr></tbody></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar</body></html>", + "noQuirksBodyHtml": "foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><p>spam</p><table><tbody><tr><td><img></td></tr></tbody></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar" + } + } + ], + "tests14.dat": [ + { + "data": "<!DOCTYPE html><html><body><xyz:abc></xyz:abc>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xyz:abc": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xyz:abc" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><xyz:abc></xyz:abc></body></html>", + "noQuirksBodyHtml": "<xyz:abc></xyz:abc>" + } + }, + { + "data": "<!DOCTYPE html><html><body><xyz:abc></xyz:abc><span></span>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xyz:abc": true, + "span": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xyz:abc" + }, + { + "tag": "span" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><xyz:abc></xyz:abc><span></span></body></html>", + "noQuirksBodyHtml": "<xyz:abc></xyz:abc><span></span>" + } + }, + { + "data": "<!DOCTYPE html><html><html abc:def=gh><xyz:abc></xyz:abc>", + "errors": [ + "(1,38): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xyz:abc": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "abc:def", + "value": "gh" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xyz:abc" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html abc:def=\"gh\"><head></head><body><xyz:abc></xyz:abc></body></html>", + "noQuirksBodyHtml": "<xyz:abc></xyz:abc>" + } + }, + { + "data": "<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo>", + "errors": [ + "(1,53): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "xml:lang", + "value": "bar" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html xml:lang=\"bar\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html><html 123=456>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "123", + "value": "456" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html 123=\"456\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html><html 123=456><html 789=012>", + "errors": [ + "(1,43): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "123", + "value": "456" + }, + { + "name": "789", + "value": "012" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html 123=\"456\" 789=\"012\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html><html><body 789=012>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "789", + "value": "012" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body 789=\"012\"></body></html>", + "noQuirksBodyHtml": "" + } + } + ], + "tests15.dat": [ + { + "data": "<!DOCTYPE html><p><b><i><u></p> <p>X", + "errors": [ + "(1,31): unexpected-end-tag", + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true, + "i": true, + "u": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "u" + } + ] + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "u", + "children": [ + { + "text": " " + }, + { + "tag": "p", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><b><i><u></u></i></b></p><b><i><u> <p>X</p></u></i></b></body></html>", + "noQuirksBodyHtml": "<p><b><i><u></u></i></b></p><b><i><u> <p>X</p></u></i></b>" + } + }, + { + "data": "<p><b><i><u></p>\n<p>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,16): unexpected-end-tag", + "(2,4): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true, + "i": true, + "u": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "u" + } + ] + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "u", + "children": [ + { + "text": "\n" + }, + { + "tag": "p", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><b><i><u></u></i></b></p><b><i><u>\n<p>X</p></u></i></b></body></html>", + "noQuirksBodyHtml": "<p><b><i><u></u></i></b></p><b><i><u>\n<p>X</p></u></i></b>" + } + }, + { + "data": "<!doctype html></html> <head>", + "errors": [ + "(1,29): expected-eof-but-got-start-tag", + "(1,29): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " " + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> </body></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!doctype html></body><meta>", + "errors": [ + "(1,28): unexpected-start-tag-after-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "meta": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "meta" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><meta></body></html>", + "noQuirksBodyHtml": "<meta>" + } + }, + { + "data": "<html></html><!-- foo -->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + }, + { + "comment": " foo " + } + ], + "html": "<html><head></head><body></body></html><!-- foo -->", + "noQuirksBodyHtml": "<!-- foo -->" + } + }, + { + "data": "<!doctype html></body><title>X</title>", + "errors": [ + "(1,29): unexpected-start-tag-after-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "title": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><title>X</title></body></html>", + "noQuirksBodyHtml": "<title>X</title>" + } + }, + { + "data": "<!doctype html><table> X<meta></table>", + "errors": [ + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character", + "(1,30): foster-parenting-start-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "meta": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " X" + }, + { + "tag": "meta" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> X<meta><table></table></body></html>", + "noQuirksBodyHtml": " X<meta><table></table>" + } + }, + { + "data": "<!doctype html><table> x</table>", + "errors": [ + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " x" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> x<table></table></body></html>", + "noQuirksBodyHtml": " x<table></table>" + } + }, + { + "data": "<!doctype html><table> x </table>", + "errors": [ + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character", + "(1,25): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " x " + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> x <table></table></body></html>", + "noQuirksBodyHtml": " x <table></table>" + } + }, + { + "data": "<!doctype html><table><tr> x</table>", + "errors": [ + "(1,27): foster-parenting-character", + "(1,28): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " x" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> x<table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": " x<table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table>X<style> <tr>x </style> </table>", + "errors": [ + "(1,23): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "table", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <tr>x ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X<table><style> <tr>x </style> </table></body></html>", + "noQuirksBodyHtml": "X<table><style> <tr>x </style> </table>" + } + }, + { + "data": "<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>", + "errors": [ + "(1,30): foster-parenting-start-tag", + "(1,31): foster-parenting-character", + "(1,32): foster-parenting-character", + "(1,33): foster-parenting-character", + "(1,37): foster-parenting-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "a": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "bar" + } + ] + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div><a>foo</a><table> <tbody><tr><td>bar</td> </tr></tbody></table></div></body></html>", + "noQuirksBodyHtml": "<div><a>foo</a><table> <tbody><tr><td>bar</td> </tr></tbody></table></div>" + } + }, + { + "data": "<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,7): unexpected-start-tag-ignored", + "(1,15): unexpected-end-tag", + "(1,23): unexpected-end-tag", + "(1,33): unexpected-start-tag", + "(1,99): expected-named-closing-tag-but-got-eof", + "(1,99): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true, + "noframes": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + }, + { + "tag": "noframes", + "children": [ + { + "text": "</frameset><noframes>", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes></noframes></frameset></html>", + "noQuirksBodyHtml": "<noframes></frameset><noframes></noframes>" + } + }, + { + "data": "<!DOCTYPE html><object></html>", + "errors": [ + "(1,30): expected-body-in-scope", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "object": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "object" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><object></object></body></html>", + "noQuirksBodyHtml": "<object></object>" + } + } + ], + "tests16.dat": [ + { + "data": "<!doctype html><script>", + "errors": [ + "(1,23): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<!doctype html><script>a", + "errors": [ + "(1,24): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script>a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script>a</script>" + } + }, + { + "data": "<!doctype html><script><", + "errors": [ + "(1,24): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><</script>" + } + }, + { + "data": "<!doctype html><script></", + "errors": [ + "(1,25): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></</script>" + } + }, + { + "data": "<!doctype html><script></S", + "errors": [ + "(1,26): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</S", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></S</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></S</script>" + } + }, + { + "data": "<!doctype html><script></SC", + "errors": [ + "(1,27): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SC", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></SC</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SC</script>" + } + }, + { + "data": "<!doctype html><script></SCR", + "errors": [ + "(1,28): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCR", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></SCR</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCR</script>" + } + }, + { + "data": "<!doctype html><script></SCRI", + "errors": [ + "(1,29): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRI", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></SCRI</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRI</script>" + } + }, + { + "data": "<!doctype html><script></SCRIP", + "errors": [ + "(1,30): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRIP", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></SCRIP</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRIP</script>" + } + }, + { + "data": "<!doctype html><script></SCRIPT", + "errors": [ + "(1,31): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRIPT", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></SCRIPT</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRIPT</script>" + } + }, + { + "data": "<!doctype html><script></SCRIPT ", + "errors": [ + "(1,32): expected-attribute-name-but-got-eof", + "(1,32): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<!doctype html><script></s", + "errors": [ + "(1,26): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></s</script>" + } + }, + { + "data": "<!doctype html><script></sc", + "errors": [ + "(1,27): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</sc", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></sc</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></sc</script>" + } + }, + { + "data": "<!doctype html><script></scr", + "errors": [ + "(1,28): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scr", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></scr</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scr</script>" + } + }, + { + "data": "<!doctype html><script></scri", + "errors": [ + "(1,29): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scri", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></scri</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scri</script>" + } + }, + { + "data": "<!doctype html><script></scrip", + "errors": [ + "(1,30): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scrip", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></scrip</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scrip</script>" + } + }, + { + "data": "<!doctype html><script></script", + "errors": [ + "(1,31): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script</script>" + } + }, + { + "data": "<!doctype html><script></script ", + "errors": [ + "(1,32): expected-attribute-name-but-got-eof", + "(1,32): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<!doctype html><script><!", + "errors": [ + "(1,25): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!</script>" + } + }, + { + "data": "<!doctype html><script><!a", + "errors": [ + "(1,26): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!a</script>" + } + }, + { + "data": "<!doctype html><script><!-", + "errors": [ + "(1,26): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!-", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!-</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!-</script>" + } + }, + { + "data": "<!doctype html><script><!-a", + "errors": [ + "(1,27): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!-a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!-a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!-a</script>" + } + }, + { + "data": "<!doctype html><script><!--", + "errors": [ + "(1,27): expected-named-closing-tag-but-got-eof", + "(1,27): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script>" + } + }, + { + "data": "<!doctype html><script><!--a", + "errors": [ + "(1,28): expected-named-closing-tag-but-got-eof", + "(1,28): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--a</script>" + } + }, + { + "data": "<!doctype html><script><!--<", + "errors": [ + "(1,28): expected-named-closing-tag-but-got-eof", + "(1,28): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<</script>" + } + }, + { + "data": "<!doctype html><script><!--<a", + "errors": [ + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<a</script>" + } + }, + { + "data": "<!doctype html><script><!--</", + "errors": [ + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--</", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--</</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</</script>" + } + }, + { + "data": "<!doctype html><script><!--</script", + "errors": [ + "(1,35): expected-named-closing-tag-but-got-eof", + "(1,35): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--</script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--</script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script</script>" + } + }, + { + "data": "<!doctype html><script><!--</script ", + "errors": [ + "(1,36): expected-attribute-name-but-got-eof", + "(1,36): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script>" + } + }, + { + "data": "<!doctype html><script><!--<s", + "errors": [ + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<s</script>" + } + }, + { + "data": "<!doctype html><script><!--<script", + "errors": [ + "(1,34): expected-named-closing-tag-but-got-eof", + "(1,34): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script</script>" + } + }, + { + "data": "<!doctype html><script><!--<script ", + "errors": [ + "(1,35): eof-in-script-in-script", + "(1,35): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script>" + } + }, + { + "data": "<!doctype html><script><!--<script <", + "errors": [ + "(1,36): eof-in-script-in-script", + "(1,36): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script <", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script <</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script <</script>" + } + }, + { + "data": "<!doctype html><script><!--<script <a", + "errors": [ + "(1,37): eof-in-script-in-script", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script <a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script <a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script <a</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </", + "errors": [ + "(1,37): eof-in-script-in-script", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </s", + "errors": [ + "(1,38): eof-in-script-in-script", + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </s</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script", + "errors": [ + "(1,43): eof-in-script-in-script", + "(1,43): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </scripta", + "errors": [ + "(1,44): eof-in-script-in-script", + "(1,44): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </scripta", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </scripta</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </scripta</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script ", + "errors": [ + "(1,44): expected-named-closing-tag-but-got-eof", + "(1,44): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script>", + "errors": [ + "(1,44): expected-named-closing-tag-but-got-eof", + "(1,44): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script></script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script/", + "errors": [ + "(1,44): expected-named-closing-tag-but-got-eof", + "(1,44): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script/", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script/</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script/</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script <", + "errors": [ + "(1,45): expected-named-closing-tag-but-got-eof", + "(1,45): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script <", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script <</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script <</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script <a", + "errors": [ + "(1,46): expected-named-closing-tag-but-got-eof", + "(1,46): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script <a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script <a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script <a</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script </", + "errors": [ + "(1,46): expected-named-closing-tag-but-got-eof", + "(1,46): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script </", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script </script", + "errors": [ + "(1,52): expected-named-closing-tag-but-got-eof", + "(1,52): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script </script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script</script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script </script ", + "errors": [ + "(1,53): expected-attribute-name-but-got-eof", + "(1,53): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script </script/", + "errors": [ + "(1,53): unexpected-EOF-after-solidus-in-tag", + "(1,53): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<!doctype html><script><!--<script </script </script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<!doctype html><script><!--<script -", + "errors": [ + "(1,36): eof-in-script-in-script", + "(1,36): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script -</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script -</script>" + } + }, + { + "data": "<!doctype html><script><!--<script -a", + "errors": [ + "(1,37): eof-in-script-in-script", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script -a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script -a</script>" + } + }, + { + "data": "<!doctype html><script><!--<script -<", + "errors": [ + "(1,37): eof-in-script-in-script", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script -<</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script -<</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --", + "errors": [ + "(1,37): eof-in-script-in-script", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --a", + "errors": [ + "(1,38): eof-in-script-in-script", + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --a</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --<", + "errors": [ + "(1,38): eof-in-script-in-script", + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --<</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --<</script>" + } + }, + { + "data": "<!doctype html><script><!--<script -->", + "errors": [ + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<!doctype html><script><!--<script --><", + "errors": [ + "(1,39): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --><", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --><</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --><</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --></", + "errors": [ + "(1,40): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --></", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --></script", + "errors": [ + "(1,46): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --></script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script</script>" + } + }, + { + "data": "<!doctype html><script><!--<script --></script ", + "errors": [ + "(1,47): expected-attribute-name-but-got-eof", + "(1,47): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<!doctype html><script><!--<script --></script/", + "errors": [ + "(1,47): unexpected-EOF-after-solidus-in-tag", + "(1,47): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<!doctype html><script><!--<script --></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<!doctype html><script><!--<script><\\/script>--></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script><\\/script>-->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script><\\/script>--></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script><\\/script>--></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></scr'+'ipt>--></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></scr'+'ipt>-->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></scr'+'ipt>--></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></scr'+'ipt>--></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script>--><!--</script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>--><!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script>--><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>--><!--</script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script>-- ></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>-- >", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script>-- ></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>-- ></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script>- -></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>- ->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script>- -></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>- -></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script>- - ></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>- - >", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script>- - ></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>- - ></script>" + } + }, + { + "data": "<!doctype html><script><!--<script></script><script></script>-></script>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></script><script></script>-></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>-></script>" + } + }, + { + "data": "<!doctype html><script><!--<script>--!></script>X", + "errors": [ + "(1,49): expected-named-closing-tag-but-got-eof", + "(1,49): unexpected-EOF-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script>--!></script>X", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script>--!></script>X</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script>--!></script>X</script>" + } + }, + { + "data": "<!doctype html><script><!--<scr'+'ipt></script>--></script>", + "errors": [ + "(1,59): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<scr'+'ipt>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<scr'+'ipt></script></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<script><!--<scr'+'ipt></script>--&gt;" + } + }, + { + "data": "<!doctype html><script><!--<script></scr'+'ipt></script>X", + "errors": [ + "(1,57): expected-named-closing-tag-but-got-eof", + "(1,57): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></scr'+'ipt></script>X", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script><!--<script></scr'+'ipt></script>X</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></scr'+'ipt></script>X</script>" + } + }, + { + "data": "<!doctype html><style><!--<style></style>--></style>", + "errors": [ + "(1,52): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--<style>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--<style></style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--<style></style>--&gt;" + } + }, + { + "data": "<!doctype html><style><!--</style>X", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--</style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style><!--</style>X" + } + }, + { + "data": "<!doctype html><style><!--...</style>...--></style>", + "errors": [ + "(1,51): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "...-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--...</style></head><body>...--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--...</style>...--&gt;" + } + }, + { + "data": "<!doctype html><style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X" + } + }, + { + "data": "<!doctype html><style><!--...<style><!--...--!></style>--></style>", + "errors": [ + "(1,66): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...<style><!--...--!>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--...<style><!--...--!></style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--...<style><!--...--!></style>--&gt;" + } + }, + { + "data": "<!doctype html><style><!--...</style><!-- --><style>@import ...</style>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...", + "no_escape": true + } + ] + }, + { + "comment": " " + }, + { + "tag": "style", + "children": [ + { + "text": "@import ...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style><!--...</style><!-- --><style>@import ...</style></head><body></body></html>", + "noQuirksBodyHtml": "<style><!--...</style><!-- --><style>@import ...</style>" + } + }, + { + "data": "<!doctype html><style>...<style><!--...</style><!-- --></style>", + "errors": [ + "(1,63): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "...<style><!--...", + "no_escape": true + } + ] + }, + { + "comment": " " + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style>...<style><!--...</style><!-- --></head><body></body></html>", + "noQuirksBodyHtml": "<style>...<style><!--...</style><!-- -->" + } + }, + { + "data": "<!doctype html><style>...<!--[if IE]><style>...</style>X", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "...<!--[if IE]><style>...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><style>...<!--[if IE]><style>...</style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style>...<!--[if IE]><style>...</style>X" + } + }, + { + "data": "<!doctype html><title><!--<title></title>--></title>", + "errors": [ + "(1,52): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<!--<title>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>&lt;!--&lt;title&gt;</title></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<title>&lt;!--&lt;title&gt;</title>--&gt;" + } + }, + { + "data": "<!doctype html><title>&lt;/title></title>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "</title>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>&lt;/title&gt;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;/title&gt;</title>" + } + }, + { + "data": "<!doctype html><title>foo/title><link></head><body>X", + "errors": [ + "(1,52): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "foo/title><link></head><body>X", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>foo/title&gt;&lt;link&gt;&lt;/head&gt;&lt;body&gt;X</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>foo/title&gt;&lt;link&gt;&lt;/head&gt;&lt;body&gt;X</title>" + } + }, + { + "data": "<!doctype html><noscript><!--<noscript></noscript>--></noscript>", + "errors": [ + "(1,64): unexpected-end-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<!--<noscript>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript><!--<noscript></noscript></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--&lt;noscript&gt;</noscript>--&gt;" + } + }, + { + "data": "<!doctype html><noscript><!--<noscript></noscript>--></noscript>", + "errors": [], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "comment": "<noscript></noscript>" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript><!--<noscript></noscript>--></noscript></head><body></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--&lt;noscript&gt;</noscript>--&gt;" + } + }, + { + "data": "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>", + "errors": [], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "noscript", + "children": [ + { + "text": "-->", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript><!--</noscript></head><body>X<noscript>--></noscript></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>X<noscript>--&gt;</noscript>" + } + }, + { + "data": "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>", + "errors": [], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "comment": "</noscript>X<noscript>" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript><!--</noscript>X<noscript>--></noscript></head><body></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>X<noscript>--&gt;</noscript>" + } + }, + { + "data": "<!doctype html><noscript><iframe></noscript>X", + "errors": [], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<iframe>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript><iframe></noscript></head><body>X</body></html>", + "noQuirksBodyHtml": "<noscript>&lt;iframe&gt;</noscript>X" + } + }, + { + "data": "<!doctype html><noscript><iframe></noscript>X", + "errors": [ + " * (1,34) unexpected token in head noscript", + " * (1,46) unexpected EOF" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true, + "iframe": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript" + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "</noscript>X", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noscript></noscript></head><body><iframe></noscript>X</iframe></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;iframe&gt;</noscript>X" + } + }, + { + "data": "<!doctype html><noframes><!--<noframes></noframes>--></noframes>", + "errors": [ + "(1,64): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noframes": true, + "body": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noframes", + "children": [ + { + "text": "<!--<noframes>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noframes><!--<noframes></noframes></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<noframes><!--<noframes></noframes>--&gt;" + } + }, + { + "data": "<!doctype html><noframes><body><script><!--...</script></body></noframes></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noframes": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noframes", + "children": [ + { + "text": "<body><script><!--...</script></body>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><noframes><body><script><!--...</script></body></noframes></head><body></body></html>", + "noQuirksBodyHtml": "<noframes><body><script><!--...</script></body></noframes>" + } + }, + { + "data": "<!doctype html><textarea><!--<textarea></textarea>--></textarea>", + "errors": [ + "(1,64): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<!--<textarea>", + "escaped": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>&lt;!--&lt;textarea&gt;</textarea>--&gt;</body></html>", + "noQuirksBodyHtml": "<textarea>&lt;!--&lt;textarea&gt;</textarea>--&gt;" + } + }, + { + "data": "<!doctype html><textarea>&lt;/textarea></textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "</textarea>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>&lt;/textarea&gt;</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>&lt;/textarea&gt;</textarea>" + } + }, + { + "data": "<!doctype html><textarea>&lt;</textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>&lt;</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>&lt;</textarea>" + } + }, + { + "data": "<!doctype html><textarea>a&lt;b</textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "a<b", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>a&lt;b</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>a&lt;b</textarea>" + } + }, + { + "data": "<!doctype html><iframe><!--<iframe></iframe>--></iframe>", + "errors": [ + "(1,56): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "<!--<iframe>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><iframe><!--<iframe></iframe>--&gt;</body></html>", + "noQuirksBodyHtml": "<iframe><!--<iframe></iframe>--&gt;" + } + }, + { + "data": "<!doctype html><iframe>...<!--X->...<!--/X->...</iframe>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "...<!--X->...<!--/X->...", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><iframe>...<!--X->...<!--/X->...</iframe></body></html>", + "noQuirksBodyHtml": "<iframe>...<!--X->...<!--/X->...</iframe>" + } + }, + { + "data": "<!doctype html><xmp><!--<xmp></xmp>--></xmp>", + "errors": [ + "(1,44): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xmp": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xmp", + "children": [ + { + "text": "<!--<xmp>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><xmp><!--<xmp></xmp>--&gt;</body></html>", + "noQuirksBodyHtml": "<xmp><!--<xmp></xmp>--&gt;" + } + }, + { + "data": "<!doctype html><noembed><!--<noembed></noembed>--></noembed>", + "errors": [ + "(1,60): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "noembed": true + }, + "doctype": true, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "noembed", + "children": [ + { + "text": "<!--<noembed>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><noembed><!--<noembed></noembed>--&gt;</body></html>", + "noQuirksBodyHtml": "<noembed><!--<noembed></noembed>--&gt;" + } + }, + { + "data": "<script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,8): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<script>a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,9): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script>a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script>a</script>" + } + }, + { + "data": "<script><", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,9): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><</script>" + } + }, + { + "data": "<script></", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,10): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></</script>" + } + }, + { + "data": "<script></S", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</S", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></S</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></S</script>" + } + }, + { + "data": "<script></SC", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,12): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SC", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></SC</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SC</script>" + } + }, + { + "data": "<script></SCR", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,13): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCR", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></SCR</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCR</script>" + } + }, + { + "data": "<script></SCRI", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRI", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></SCRI</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRI</script>" + } + }, + { + "data": "<script></SCRIP", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,15): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRIP", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></SCRIP</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRIP</script>" + } + }, + { + "data": "<script></SCRIPT", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,16): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</SCRIPT", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></SCRIPT</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></SCRIPT</script>" + } + }, + { + "data": "<script></SCRIPT ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,17): expected-attribute-name-but-got-eof", + "(1,17): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<script></s", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></s</script>" + } + }, + { + "data": "<script></sc", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,12): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</sc", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></sc</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></sc</script>" + } + }, + { + "data": "<script></scr", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,13): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scr", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></scr</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scr</script>" + } + }, + { + "data": "<script></scri", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scri", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></scri</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scri</script>" + } + }, + { + "data": "<script></scrip", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,15): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</scrip", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></scrip</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></scrip</script>" + } + }, + { + "data": "<script></script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,16): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script</script>" + } + }, + { + "data": "<script></script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,17): expected-attribute-name-but-got-eof", + "(1,17): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<script><!", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,10): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!</script>" + } + }, + { + "data": "<script><!a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!a</script>" + } + }, + { + "data": "<script><!-", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!-", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!-</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!-</script>" + } + }, + { + "data": "<script><!-a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,12): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!-a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!-a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!-a</script>" + } + }, + { + "data": "<script><!--", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,12): expected-named-closing-tag-but-got-eof", + "(1,12): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script>" + } + }, + { + "data": "<script><!--a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,13): expected-named-closing-tag-but-got-eof", + "(1,13): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--a</script>" + } + }, + { + "data": "<script><!--<", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,13): expected-named-closing-tag-but-got-eof", + "(1,13): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<</script>" + } + }, + { + "data": "<script><!--<a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): expected-named-closing-tag-but-got-eof", + "(1,14): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<a</script>" + } + }, + { + "data": "<script><!--</", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): expected-named-closing-tag-but-got-eof", + "(1,14): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--</", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--</</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</</script>" + } + }, + { + "data": "<script><!--</script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,20): expected-named-closing-tag-but-got-eof", + "(1,20): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--</script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--</script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script</script>" + } + }, + { + "data": "<script><!--</script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,21): expected-attribute-name-but-got-eof", + "(1,21): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--</script>" + } + }, + { + "data": "<script><!--<s", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,14): expected-named-closing-tag-but-got-eof", + "(1,14): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<s</script>" + } + }, + { + "data": "<script><!--<script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,19): expected-named-closing-tag-but-got-eof", + "(1,19): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script</script>" + } + }, + { + "data": "<script><!--<script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,20): eof-in-script-in-script", + "(1,20): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script>" + } + }, + { + "data": "<script><!--<script <", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,21): eof-in-script-in-script", + "(1,21): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script <", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script <</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script <</script>" + } + }, + { + "data": "<script><!--<script <a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,22): eof-in-script-in-script", + "(1,22): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script <a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script <a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script <a</script>" + } + }, + { + "data": "<script><!--<script </", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,22): eof-in-script-in-script", + "(1,22): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </</script>" + } + }, + { + "data": "<script><!--<script </s", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,23): eof-in-script-in-script", + "(1,23): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </s", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </s</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </s</script>" + } + }, + { + "data": "<script><!--<script </script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,28): eof-in-script-in-script", + "(1,28): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script</script>" + } + }, + { + "data": "<script><!--<script </scripta", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,29): eof-in-script-in-script", + "(1,29): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </scripta", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </scripta</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </scripta</script>" + } + }, + { + "data": "<script><!--<script </script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<script><!--<script </script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script></script>" + } + }, + { + "data": "<script><!--<script </script/", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,29): expected-named-closing-tag-but-got-eof", + "(1,29): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script/", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script/</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script/</script>" + } + }, + { + "data": "<script><!--<script </script <", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,30): expected-named-closing-tag-but-got-eof", + "(1,30): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script <", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script <</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script <</script>" + } + }, + { + "data": "<script><!--<script </script <a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,31): expected-named-closing-tag-but-got-eof", + "(1,31): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script <a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script <a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script <a</script>" + } + }, + { + "data": "<script><!--<script </script </", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,31): expected-named-closing-tag-but-got-eof", + "(1,31): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script </", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </</script>" + } + }, + { + "data": "<script><!--<script </script </script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,37): expected-named-closing-tag-but-got-eof", + "(1,37): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script </script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script</script>" + } + }, + { + "data": "<script><!--<script </script </script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,38): expected-attribute-name-but-got-eof", + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<script><!--<script </script </script/", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,38): unexpected-EOF-after-solidus-in-tag", + "(1,38): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<script><!--<script </script </script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script </script ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script </script </script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script </script </script>" + } + }, + { + "data": "<script><!--<script -", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,21): eof-in-script-in-script", + "(1,21): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script -</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script -</script>" + } + }, + { + "data": "<script><!--<script -a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,22): eof-in-script-in-script", + "(1,22): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script -a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script -a</script>" + } + }, + { + "data": "<script><!--<script --", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,22): eof-in-script-in-script", + "(1,22): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --</script>" + } + }, + { + "data": "<script><!--<script --a", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,23): eof-in-script-in-script", + "(1,23): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --a", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --a</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --a</script>" + } + }, + { + "data": "<script><!--<script -->", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,23): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<script><!--<script --><", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,24): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --><", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --><</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --><</script>" + } + }, + { + "data": "<script><!--<script --></", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,25): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --></", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></</script>" + } + }, + { + "data": "<script><!--<script --></script", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,31): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script --></script", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></script</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script</script>" + } + }, + { + "data": "<script><!--<script --></script ", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,32): expected-attribute-name-but-got-eof", + "(1,32): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<script><!--<script --></script/", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,32): unexpected-EOF-after-solidus-in-tag", + "(1,32): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<script><!--<script --></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script -->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script --></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script --></script>" + } + }, + { + "data": "<script><!--<script><\\/script>--></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script><\\/script>-->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script><\\/script>--></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script><\\/script>--></script>" + } + }, + { + "data": "<script><!--<script></scr'+'ipt>--></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></scr'+'ipt>-->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></scr'+'ipt>--></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></scr'+'ipt>--></script>" + } + }, + { + "data": "<script><!--<script></script><script></script></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script></script>" + } + }, + { + "data": "<script><!--<script></script><script></script>--><!--</script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>--><!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script>--><!--</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>--><!--</script>" + } + }, + { + "data": "<script><!--<script></script><script></script>-- ></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>-- >", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script>-- ></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>-- ></script>" + } + }, + { + "data": "<script><!--<script></script><script></script>- -></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>- ->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script>- -></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>- -></script>" + } + }, + { + "data": "<script><!--<script></script><script></script>- - ></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>- - >", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script>- - ></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>- - ></script>" + } + }, + { + "data": "<script><!--<script></script><script></script>-></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></script><script></script>->", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></script><script></script>-></script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></script><script></script>-></script>" + } + }, + { + "data": "<script><!--<script>--!></script>X", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,34): expected-named-closing-tag-but-got-eof", + "(1,34): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script>--!></script>X", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script>--!></script>X</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script>--!></script>X</script>" + } + }, + { + "data": "<script><!--<scr'+'ipt></script>--></script>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,44): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<scr'+'ipt>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><script><!--<scr'+'ipt></script></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<script><!--<scr'+'ipt></script>--&gt;" + } + }, + { + "data": "<script><!--<script></scr'+'ipt></script>X", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,42): expected-named-closing-tag-but-got-eof", + "(1,42): unexpected-eof-in-text-mode" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "<!--<script></scr'+'ipt></script>X", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script><!--<script></scr'+'ipt></script>X</script></head><body></body></html>", + "noQuirksBodyHtml": "<script><!--<script></scr'+'ipt></script>X</script>" + } + }, + { + "data": "<style><!--<style></style>--></style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,37): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--<style>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style><!--<style></style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--<style></style>--&gt;" + } + }, + { + "data": "<style><!--</style>X", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<html><head><style><!--</style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style><!--</style>X" + } + }, + { + "data": "<style><!--...</style>...--></style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,36): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "...-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style><!--...</style></head><body>...--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--...</style>...--&gt;" + } + }, + { + "data": "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<html><head><style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X" + } + }, + { + "data": "<style><!--...<style><!--...--!></style>--></style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,51): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...<style><!--...--!>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style><!--...<style><!--...--!></style></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<style><!--...<style><!--...--!></style>--&gt;" + } + }, + { + "data": "<style><!--...</style><!-- --><style>@import ...</style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "<!--...", + "no_escape": true + } + ] + }, + { + "comment": " " + }, + { + "tag": "style", + "children": [ + { + "text": "@import ...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><style><!--...</style><!-- --><style>@import ...</style></head><body></body></html>", + "noQuirksBodyHtml": "<style><!--...</style><!-- --><style>@import ...</style>" + } + }, + { + "data": "<style>...<style><!--...</style><!-- --></style>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,48): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "...<style><!--...", + "no_escape": true + } + ] + }, + { + "comment": " " + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><style>...<style><!--...</style><!-- --></head><body></body></html>", + "noQuirksBodyHtml": "<style>...<style><!--...</style><!-- -->" + } + }, + { + "data": "<style>...<!--[if IE]><style>...</style>X", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "...<!--[if IE]><style>...", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<html><head><style>...<!--[if IE]><style>...</style></head><body>X</body></html>", + "noQuirksBodyHtml": "<style>...<!--[if IE]><style>...</style>X" + } + }, + { + "data": "<title><!--<title></title>--></title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,37): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<!--<title>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><title>&lt;!--&lt;title&gt;</title></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<title>&lt;!--&lt;title&gt;</title>--&gt;" + } + }, + { + "data": "<title>&lt;/title></title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "</title>", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>&lt;/title&gt;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;/title&gt;</title>" + } + }, + { + "data": "<title>foo/title><link></head><body>X", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,37): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "foo/title><link></head><body>X", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>foo/title&gt;&lt;link&gt;&lt;/head&gt;&lt;body&gt;X</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>foo/title&gt;&lt;link&gt;&lt;/head&gt;&lt;body&gt;X</title>" + } + }, + { + "data": "<noscript><!--<noscript></noscript>--></noscript>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,49): unexpected-end-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<!--<noscript>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><noscript><!--<noscript></noscript></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--&lt;noscript&gt;</noscript>--&gt;" + } + }, + { + "data": "<noscript><!--<noscript></noscript>--></noscript>", + "errors": [ + " * (1,11) missing DOCTYPE" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "comment": "<noscript></noscript>" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><noscript><!--<noscript></noscript>--></noscript></head><body></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--&lt;noscript&gt;</noscript>--&gt;" + } + }, + { + "data": "<noscript><!--</noscript>X<noscript>--></noscript>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "noscript", + "children": [ + { + "text": "-->", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head><noscript><!--</noscript></head><body>X<noscript>--></noscript></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>X<noscript>--&gt;</noscript>" + } + }, + { + "data": "<noscript><!--</noscript>X<noscript>--></noscript>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "comment": "</noscript>X<noscript>" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><noscript><!--</noscript>X<noscript>--></noscript></head><body></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>X<noscript>--&gt;</noscript>" + } + }, + { + "data": "<noscript><iframe></noscript>X", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<iframe>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<html><head><noscript><iframe></noscript></head><body>X</body></html>", + "noQuirksBodyHtml": "<noscript>&lt;iframe&gt;</noscript>X" + } + }, + { + "data": "<noscript><iframe></noscript>X", + "errors": [ + " * (1,11) missing DOCTYPE", + " * (1,19) unexpected token in head noscript", + " * (1,31) unexpected EOF" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true, + "iframe": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript" + } + ] + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "</noscript>X", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head><noscript></noscript></head><body><iframe></noscript>X</iframe></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;iframe&gt;</noscript>X" + } + }, + { + "data": "<noframes><!--<noframes></noframes>--></noframes>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,49): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noframes": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noframes", + "children": [ + { + "text": "<!--<noframes>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><noframes><!--<noframes></noframes></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<noframes><!--<noframes></noframes>--&gt;" + } + }, + { + "data": "<noframes><body><script><!--...</script></body></noframes></html>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noframes": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noframes", + "children": [ + { + "text": "<body><script><!--...</script></body>", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><noframes><body><script><!--...</script></body></noframes></head><body></body></html>", + "noQuirksBodyHtml": "<noframes><body><script><!--...</script></body></noframes>" + } + }, + { + "data": "<textarea><!--<textarea></textarea>--></textarea>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,49): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "<!--<textarea>", + "escaped": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>&lt;!--&lt;textarea&gt;</textarea>--&gt;</body></html>", + "noQuirksBodyHtml": "<textarea>&lt;!--&lt;textarea&gt;</textarea>--&gt;" + } + }, + { + "data": "<textarea>&lt;/textarea></textarea>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "</textarea>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>&lt;/textarea&gt;</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>&lt;/textarea&gt;</textarea>" + } + }, + { + "data": "<iframe><!--<iframe></iframe>--></iframe>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,41): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "<!--<iframe>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><iframe><!--<iframe></iframe>--&gt;</body></html>", + "noQuirksBodyHtml": "<iframe><!--<iframe></iframe>--&gt;" + } + }, + { + "data": "<iframe>...<!--X->...<!--/X->...</iframe>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": "...<!--X->...<!--/X->...", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><iframe>...<!--X->...<!--/X->...</iframe></body></html>", + "noQuirksBodyHtml": "<iframe>...<!--X->...<!--/X->...</iframe>" + } + }, + { + "data": "<xmp><!--<xmp></xmp>--></xmp>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,29): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xmp": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xmp", + "children": [ + { + "text": "<!--<xmp>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><xmp><!--<xmp></xmp>--&gt;</body></html>", + "noQuirksBodyHtml": "<xmp><!--<xmp></xmp>--&gt;" + } + }, + { + "data": "<noembed><!--<noembed></noembed>--></noembed>", + "errors": [ + "(1,9): expected-doctype-but-got-start-tag", + "(1,45): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "noembed": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "noembed", + "children": [ + { + "text": "<!--<noembed>", + "no_escape": true + } + ] + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><noembed><!--<noembed></noembed>--&gt;</body></html>", + "noQuirksBodyHtml": "<noembed><!--<noembed></noembed>--&gt;" + } + }, + { + "data": "<!doctype html><table>\n", + "errors": [ + "(2,0): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "text": "\n" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table>\n</table></body></html>", + "noQuirksBodyHtml": "<table>\n</table>" + } + }, + { + "data": "<!doctype html><table><td><span><font></span><span>", + "errors": [ + "(1,26): unexpected-cell-in-table-body", + "(1,45): unexpected-end-tag", + "(1,51): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "span": true, + "font": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "font" + } + ] + }, + { + "tag": "font", + "children": [ + { + "tag": "span" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><span><font></font></span><font><span></span></font></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><span><font></font></span><font><span></span></font></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><form><table></form><form></table></form>", + "errors": [ + "(1,35): unexpected-end-tag-implies-table-voodoo", + "(1,35): unexpected-end-tag", + "(1,41): unexpected-form-in-table", + "(1,56): unexpected-end-tag", + "(1,56): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><table><form></form></table></form></body></html>", + "noQuirksBodyHtml": "<form><table><form></form></table></form>" + } + } + ], + "tests17.dat": [ + { + "data": "<!doctype html><table><tbody><select><tr>", + "errors": [ + "(1,37): unexpected-start-tag-implies-table-voodoo", + "(1,41): unexpected-table-element-start-tag-in-select-in-table", + "(1,41): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<select></select><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><tr><select><td>", + "errors": [ + "(1,34): unexpected-start-tag-implies-table-voodoo", + "(1,38): unexpected-table-element-start-tag-in-select-in-table", + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<select></select><table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><tr><td><select><td>", + "errors": [ + "(1,42): unexpected-table-element-start-tag-in-select-in-table", + "(1,42): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "select" + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><select></select></td><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><select></select></td><td></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><tr><th><select><td>", + "errors": [ + "(1,42): unexpected-table-element-start-tag-in-select-in-table", + "(1,42): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "th": true, + "select": true, + "td": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "th", + "children": [ + { + "tag": "select" + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><th><select></select></th><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><th><select></select></th><td></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><caption><select><tr>", + "errors": [ + "(1,43): unexpected-table-element-start-tag-in-select-in-table", + "(1,43): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "select": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "select" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><select></select></caption><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><caption><select></select></caption><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><select><tr>", + "errors": [ + "(1,27): unexpected-start-tag-in-select", + "(1,27): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><td>", + "errors": [ + "(1,27): unexpected-start-tag-in-select", + "(1,27): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><th>", + "errors": [ + "(1,27): unexpected-start-tag-in-select", + "(1,27): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><tbody>", + "errors": [ + "(1,30): unexpected-start-tag-in-select", + "(1,30): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><thead>", + "errors": [ + "(1,30): unexpected-start-tag-in-select", + "(1,30): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><tfoot>", + "errors": [ + "(1,30): unexpected-start-tag-in-select", + "(1,30): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><select><caption>", + "errors": [ + "(1,32): unexpected-start-tag-in-select", + "(1,32): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><table><tr></table>a", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr></tr></tbody></table>a</body></html>", + "noQuirksBodyHtml": "<table><tbody><tr></tr></tbody></table>a" + } + } + ], + "tests18.dat": [ + { + "data": "<!doctype html><plaintext></plaintext>", + "errors": [ + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><plaintext></plaintext></plaintext></body></html>", + "noQuirksBodyHtml": "<plaintext></plaintext></plaintext>" + } + }, + { + "data": "<!doctype html><table><plaintext></plaintext>", + "errors": [ + "(1,33): foster-parenting-start-tag", + "(1,34): foster-parenting-character", + "(1,35): foster-parenting-character", + "(1,36): foster-parenting-character", + "(1,37): foster-parenting-character", + "(1,38): foster-parenting-character", + "(1,39): foster-parenting-character", + "(1,40): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,42): foster-parenting-character", + "(1,43): foster-parenting-character", + "(1,44): foster-parenting-character", + "(1,45): foster-parenting-character", + "(1,45): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true, + "table": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><plaintext></plaintext></plaintext><table></table></body></html>", + "noQuirksBodyHtml": "<plaintext></plaintext></plaintext><table></table>" + } + }, + { + "data": "<!doctype html><table><tbody><plaintext></plaintext>", + "errors": [ + "(1,40): foster-parenting-start-tag", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,52): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true, + "table": true, + "tbody": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><plaintext></plaintext></plaintext><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<plaintext></plaintext></plaintext><table><tbody></tbody></table>" + } + }, + { + "data": "<!doctype html><table><tbody><tr><plaintext></plaintext>", + "errors": [ + "(1,44): foster-parenting-start-tag", + "(1,45): foster-parenting-character", + "(1,46): foster-parenting-character", + "(1,47): foster-parenting-character", + "(1,48): foster-parenting-character", + "(1,49): foster-parenting-character", + "(1,50): foster-parenting-character", + "(1,51): foster-parenting-character", + "(1,52): foster-parenting-character", + "(1,53): foster-parenting-character", + "(1,54): foster-parenting-character", + "(1,55): foster-parenting-character", + "(1,56): foster-parenting-character", + "(1,56): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><plaintext></plaintext></plaintext><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<plaintext></plaintext></plaintext><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><td><plaintext></plaintext>", + "errors": [ + "(1,26): unexpected-cell-in-table-body", + "(1,49): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "plaintext": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><plaintext></plaintext></plaintext></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><plaintext></plaintext></plaintext></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><caption><plaintext></plaintext>", + "errors": [ + "(1,54): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "plaintext": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><plaintext></plaintext></plaintext></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><plaintext></plaintext></plaintext></caption></table>" + } + }, + { + "data": "<!doctype html><table><tr><style></script></style>abc", + "errors": [ + "(1,51): foster-parenting-character", + "(1,52): foster-parenting-character", + "(1,53): foster-parenting-character", + "(1,53): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "abc" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "</script>", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>abc<table><tbody><tr><style></script></style></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "abc<table><tbody><tr><style></script></style></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><tr><script></style></script>abc", + "errors": [ + "(1,52): foster-parenting-character", + "(1,53): foster-parenting-character", + "(1,54): foster-parenting-character", + "(1,54): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "script": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "abc" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</style>", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>abc<table><tbody><tr><script></style></script></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "abc<table><tbody><tr><script></style></script></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><caption><style></script></style>abc", + "errors": [ + "(1,58): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "</script>", + "no_escape": true + } + ] + }, + { + "text": "abc" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><style></script></style>abc</caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><style></script></style>abc</caption></table>" + } + }, + { + "data": "<!doctype html><table><td><style></script></style>abc", + "errors": [ + "(1,26): unexpected-cell-in-table-body", + "(1,53): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "style", + "children": [ + { + "text": "</script>", + "no_escape": true + } + ] + }, + { + "text": "abc" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><style></script></style>abc</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><style></script></style>abc</td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><select><script></style></script>abc", + "errors": [ + "(1,51): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "script": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</style>", + "no_escape": true + } + ] + }, + { + "text": "abc" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><script></style></script>abc</select></body></html>", + "noQuirksBodyHtml": "<select><script></style></script>abc</select>" + } + }, + { + "data": "<!doctype html><table><select><script></style></script>abc", + "errors": [ + "(1,30): unexpected-start-tag-implies-table-voodoo", + "(1,58): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "script": true, + "table": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</style>", + "no_escape": true + } + ] + }, + { + "text": "abc" + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><script></style></script>abc</select><table></table></body></html>", + "noQuirksBodyHtml": "<select><script></style></script>abc</select><table></table>" + } + }, + { + "data": "<!doctype html><table><tr><select><script></style></script>abc", + "errors": [ + "(1,34): unexpected-start-tag-implies-table-voodoo", + "(1,62): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "script": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</style>", + "no_escape": true + } + ] + }, + { + "text": "abc" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><script></style></script>abc</select><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<select><script></style></script>abc</select><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><frameset></frameset><noframes>abc", + "errors": [ + "(1,49): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "tag": "noframes", + "children": [ + { + "text": "abc", + "no_escape": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset><noframes>abc</noframes></html>", + "noQuirksBodyHtml": "<noframes>abc</noframes>" + } + }, + { + "data": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + }, + "doctype": true, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "tag": "noframes", + "children": [ + { + "text": "abc", + "no_escape": true + } + ] + }, + { + "comment": "abc" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset><noframes>abc</noframes><!--abc--></html>", + "noQuirksBodyHtml": "<noframes>abc</noframes><!--abc-->" + } + }, + { + "data": "<!doctype html><frameset></frameset></html><noframes>abc", + "errors": [ + "(1,56): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "tag": "noframes", + "children": [ + { + "text": "abc", + "no_escape": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset><noframes>abc</noframes></html>", + "noQuirksBodyHtml": "<noframes>abc</noframes>" + } + }, + { + "data": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + }, + "doctype": true, + "no_escape": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "tag": "noframes", + "children": [ + { + "text": "abc", + "no_escape": true + } + ] + } + ] + }, + { + "comment": "abc" + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset><noframes>abc</noframes></html><!--abc-->", + "noQuirksBodyHtml": "<noframes>abc</noframes><!--abc-->" + } + }, + { + "data": "<!doctype html><table><tr></tbody><tfoot>", + "errors": [ + "(1,41): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "tfoot": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + }, + { + "tag": "tfoot" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr></tr></tbody><tfoot></tfoot></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr></tr></tbody><tfoot></tfoot></table>" + } + }, + { + "data": "<!doctype html><table><td><svg></svg>abc<td>", + "errors": [ + "(1,26): unexpected-cell-in-table-body", + "(1,44): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "text": "abc" + } + ] + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><svg></svg>abc</td><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg></svg>abc</td><td></td></tr></tbody></table>" + } + } + ], + "tests19.dat": [ + { + "data": "<!doctype html><math><mn DefinitionUrl=\"foo\">", + "errors": [ + "(1,45): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mn": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "definitionURL", + "value": "foo" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mn definitionURL=\"foo\"></mn></math></body></html>", + "noQuirksBodyHtml": "<math><mn definitionURL=\"foo\"></mn></math>" + } + }, + { + "data": "<!doctype html><html></p><!--foo-->", + "errors": [ + "(1,25): end-tag-after-implied-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "comment": "foo" + }, + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><!--foo--><head></head><body></body></html>", + "noQuirksBodyHtml": "<p></p><!--foo-->" + } + }, + { + "data": "<!doctype html><head></head></p><!--foo-->", + "errors": [ + "(1,32): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "comment": "foo" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><!--foo--><body></body></html>", + "noQuirksBodyHtml": "<p></p><!--foo-->" + } + }, + { + "data": "<!doctype html><body><p><pre>", + "errors": [ + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "pre" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><pre></pre></body></html>", + "noQuirksBodyHtml": "<p></p><pre></pre>" + } + }, + { + "data": "<!doctype html><body><p><listing>", + "errors": [ + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "listing": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "listing" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><listing></listing></body></html>", + "noQuirksBodyHtml": "<p></p><listing></listing>" + } + }, + { + "data": "<!doctype html><p><plaintext>", + "errors": [ + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "plaintext": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "plaintext" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><plaintext></plaintext></body></html>", + "noQuirksBodyHtml": "<p></p><plaintext></plaintext>" + } + }, + { + "data": "<!doctype html><p><h1>", + "errors": [ + "(1,22): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><h1></h1></body></html>", + "noQuirksBodyHtml": "<p></p><h1></h1>" + } + }, + { + "data": "<!doctype html><form><isindex>", + "errors": [ + "(1,30): deprecated-tag", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form></form></body></html>", + "noQuirksBodyHtml": "<form></form>" + } + }, + { + "data": "<!doctype html><isindex action=\"POST\">", + "errors": [ + "(1,38): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "attrs": [ + { + "name": "action", + "value": "POST" + } + ], + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form action=\"POST\"><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form action=\"POST\"><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form>" + } + }, + { + "data": "<!doctype html><isindex prompt=\"this is isindex\">", + "errors": [ + "(1,49): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "this is isindex" + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><hr><label>this is isindex<input name=\"isindex\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form><hr><label>this is isindex<input name=\"isindex\"></label><hr></form>" + } + }, + { + "data": "<!doctype html><isindex type=\"hidden\">", + "errors": [ + "(1,38): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + }, + { + "name": "type", + "value": "hidden" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\" type=\"hidden\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\" type=\"hidden\"></label><hr></form>" + } + }, + { + "data": "<!doctype html><isindex name=\"foo\">", + "errors": [ + "(1,35): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form>" + } + }, + { + "data": "<!doctype html><ruby><p><rp>", + "errors": [ + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "p": true, + "rp": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "p" + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><p></p><rp></rp></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><p></p><rp></rp></ruby>" + } + }, + { + "data": "<!doctype html><ruby><div><span><rp>", + "errors": [ + "(1,36): XXX-undefined-error", + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "span": true, + "rp": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><div><span><rp></rp></span></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><span><rp></rp></span></div></ruby>" + } + }, + { + "data": "<!doctype html><ruby><div><p><rp>", + "errors": [ + "(1,33): XXX-undefined-error", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "p": true, + "rp": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "p" + }, + { + "tag": "rp" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><div><p></p><rp></rp></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><p></p><rp></rp></div></ruby>" + } + }, + { + "data": "<!doctype html><ruby><p><rt>", + "errors": [ + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "p": true, + "rt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "p" + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><p></p><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><p></p><rt></rt></ruby>" + } + }, + { + "data": "<!doctype html><ruby><div><span><rt>", + "errors": [ + "(1,36): XXX-undefined-error", + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "span": true, + "rt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><div><span><rt></rt></span></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><span><rt></rt></span></div></ruby>" + } + }, + { + "data": "<!doctype html><ruby><div><p><rt>", + "errors": [ + "(1,33): XXX-undefined-error", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "p": true, + "rt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "p" + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ruby><div><p></p><rt></rt></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><p></p><rt></rt></div></ruby>" + } + }, + { + "data": "<html><ruby>a<rb>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rb": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rb", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rb>b</rb><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rb>b</rb><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rp>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rp": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rp", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rp>b</rp><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rp>b</rp><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rt>b<rt></ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rt", + "children": [ + { + "text": "b" + } + ] + }, + { + "tag": "rt" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rt>b</rt><rt></rt></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rt>b</rt><rt></rt></ruby>" + } + }, + { + "data": "<html><ruby>a<rtc>b<rt>c<rb>d</ruby></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "rtc": true, + "rt": true, + "rb": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "text": "a" + }, + { + "tag": "rtc", + "children": [ + { + "text": "b" + }, + { + "tag": "rt", + "children": [ + { + "text": "c" + } + ] + } + ] + }, + { + "tag": "rb", + "children": [ + { + "text": "d" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby>a<rtc>b<rt>c</rt></rtc><rb>d</rb></ruby></body></html>", + "noQuirksBodyHtml": "<ruby>a<rtc>b<rt>c</rt></rtc><rb>d</rb></ruby>" + } + }, + { + "data": "<!doctype html><math/><foo>", + "errors": [ + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "foo": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "foo" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math></math><foo></foo></body></html>", + "noQuirksBodyHtml": "<math></math><foo></foo>" + } + }, + { + "data": "<!doctype html><svg/><foo>", + "errors": [ + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "foo": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "foo" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg><foo></foo></body></html>", + "noQuirksBodyHtml": "<svg></svg><foo></foo>" + } + }, + { + "data": "<!doctype html><div></body><!--foo-->", + "errors": [ + "(1,27): expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + }, + { + "comment": "foo" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div></div></body><!--foo--></html>", + "noQuirksBodyHtml": "<div><!--foo--></div>" + } + }, + { + "data": "<!doctype html><h1><div><h3><span></h1>foo", + "errors": [ + "(1,39): end-tag-too-early", + "(1,42): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "h1": true, + "div": true, + "h3": true, + "span": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "h1", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "h3", + "children": [ + { + "tag": "span" + } + ] + }, + { + "text": "foo" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><h1><div><h3><span></span></h3>foo</div></h1></body></html>", + "noQuirksBodyHtml": "<h1><div><h3><span></span></h3>foo</div></h1>" + } + }, + { + "data": "<!doctype html><p></h3>foo", + "errors": [ + "(1,23): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p>foo</p></body></html>", + "noQuirksBodyHtml": "<p>foo</p>" + } + }, + { + "data": "<!doctype html><h3><li>abc</h2>foo", + "errors": [ + "(1,31): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "h3": true, + "li": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "h3", + "children": [ + { + "tag": "li", + "children": [ + { + "text": "abc" + } + ] + } + ] + }, + { + "text": "foo" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><h3><li>abc</li></h3>foo</body></html>", + "noQuirksBodyHtml": "<h3><li>abc</li></h3>foo" + } + }, + { + "data": "<!doctype html><table>abc<!--foo-->", + "errors": [ + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character", + "(1,25): foster-parenting-character", + "(1,35): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "abc" + }, + { + "tag": "table", + "children": [ + { + "comment": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>abc<table><!--foo--></table></body></html>", + "noQuirksBodyHtml": "abc<table><!--foo--></table>" + } + }, + { + "data": "<!doctype html><table> <!--foo-->", + "errors": [ + "(1,34): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "comment": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table> <!--foo--></table></body></html>", + "noQuirksBodyHtml": "<table> <!--foo--></table>" + } + }, + { + "data": "<!doctype html><table> b <!--foo-->", + "errors": [ + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character", + "(1,25): foster-parenting-character", + "(1,35): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": " b " + }, + { + "tag": "table", + "children": [ + { + "comment": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body> b <table><!--foo--></table></body></html>", + "noQuirksBodyHtml": " b <table><!--foo--></table>" + } + }, + { + "data": "<!doctype html><select><option><option>", + "errors": [ + "(1,39): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + }, + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><option></option><option></option></select>" + } + }, + { + "data": "<!doctype html><select><option></optgroup>", + "errors": [ + "(1,42): unexpected-end-tag-in-select", + "(1,42): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><option></option></select>" + } + }, + { + "data": "<!doctype html><select><option></optgroup>", + "errors": [ + "(1,42): unexpected-end-tag-in-select", + "(1,42): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><option></option></select>" + } + }, + { + "data": "<!doctype html><dd><optgroup><dd>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dd": true, + "optgroup": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dd", + "children": [ + { + "tag": "optgroup" + } + ] + }, + { + "tag": "dd" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><dd><optgroup></optgroup></dd><dd></dd></body></html>", + "noQuirksBodyHtml": "<dd><optgroup></optgroup></dd><dd></dd>" + } + }, + { + "data": "<!doctype html><p><math><mi><p><h1>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mi": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><mi><p></p><h1></h1></mi></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><mi><p></p><h1></h1></mi></math></p>" + } + }, + { + "data": "<!doctype html><p><math><mo><p><h1>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mo": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mo", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><mo><p></p><h1></h1></mo></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><mo><p></p><h1></h1></mo></math></p>" + } + }, + { + "data": "<!doctype html><p><math><mn><p><h1>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mn": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><mn><p></p><h1></h1></mn></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><mn><p></p><h1></h1></mn></math></p>" + } + }, + { + "data": "<!doctype html><p><math><ms><p><h1>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math ms": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "ms", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><ms><p></p><h1></h1></ms></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><ms><p></p><h1></h1></ms></math></p>" + } + }, + { + "data": "<!doctype html><p><math><mtext><p><h1>", + "errors": [ + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mtext": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p" + }, + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><mtext><p></p><h1></h1></mtext></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><mtext><p></p><h1></h1></mtext></math></p>" + } + }, + { + "data": "<!doctype html><frameset></noframes>", + "errors": [ + "(1,36): unexpected-end-tag-in-frameset", + "(1,36): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><html c=d><body></html><html a=b>", + "errors": [ + "(1,48): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + }, + { + "name": "c", + "value": "d" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html c=\"d\" a=\"b\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><html c=d><frameset></frameset></html><html a=b>", + "errors": [ + "(1,63): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + }, + { + "name": "c", + "value": "d" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html c=\"d\" a=\"b\"><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><html><frameset></frameset></html><!--foo-->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + }, + { + "comment": "foo" + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html><!--foo-->", + "noQuirksBodyHtml": "<!--foo-->" + } + }, + { + "data": "<!doctype html><html><frameset></frameset></html> ", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": " " + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset> </html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!doctype html><html><frameset></frameset></html>abc", + "errors": [ + "(1,50): expected-eof-but-got-char", + "(1,51): expected-eof-but-got-char", + "(1,52): expected-eof-but-got-char" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "abc" + } + }, + { + "data": "<!doctype html><html><frameset></frameset></html><p>", + "errors": [ + "(1,52): expected-eof-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<p></p>" + } + }, + { + "data": "<!doctype html><html><frameset></frameset></html></p>", + "errors": [ + "(1,53): expected-eof-but-got-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<p></p>" + } + }, + { + "data": "<html><frameset></frameset></html><!doctype html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,49): unexpected-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><body><frameset>", + "errors": [ + "(1,31): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><p><frameset><frame>", + "errors": [ + "(1,28): unexpected-start-tag", + "(1,35): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<p></p>" + } + }, + { + "data": "<!doctype html><p>a<frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p>a</p></body></html>", + "noQuirksBodyHtml": "<p>a</p>" + } + }, + { + "data": "<!doctype html><p> <frameset><frame>", + "errors": [ + "(1,29): unexpected-start-tag", + "(1,36): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<p> </p>" + } + }, + { + "data": "<!doctype html><pre><frameset>", + "errors": [ + "(1,30): unexpected-start-tag", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre></pre></body></html>", + "noQuirksBodyHtml": "<pre></pre>" + } + }, + { + "data": "<!doctype html><listing><frameset>", + "errors": [ + "(1,34): unexpected-start-tag", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "listing": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "listing" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><listing></listing></body></html>", + "noQuirksBodyHtml": "<listing></listing>" + } + }, + { + "data": "<!doctype html><li><frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "li": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "li" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><li></li></body></html>", + "noQuirksBodyHtml": "<li></li>" + } + }, + { + "data": "<!doctype html><dd><frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dd": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dd" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><dd></dd></body></html>", + "noQuirksBodyHtml": "<dd></dd>" + } + }, + { + "data": "<!doctype html><dt><frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dt" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><dt></dt></body></html>", + "noQuirksBodyHtml": "<dt></dt>" + } + }, + { + "data": "<!doctype html><button><frameset>", + "errors": [ + "(1,33): unexpected-start-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "button" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><button></button></body></html>", + "noQuirksBodyHtml": "<button></button>" + } + }, + { + "data": "<!doctype html><applet><frameset>", + "errors": [ + "(1,33): unexpected-start-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "applet": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "applet" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><applet></applet></body></html>", + "noQuirksBodyHtml": "<applet></applet>" + } + }, + { + "data": "<!doctype html><marquee><frameset>", + "errors": [ + "(1,34): unexpected-start-tag", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "marquee": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "marquee" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><marquee></marquee></body></html>", + "noQuirksBodyHtml": "<marquee></marquee>" + } + }, + { + "data": "<!doctype html><object><frameset>", + "errors": [ + "(1,33): unexpected-start-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "object": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "object" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><object></object></body></html>", + "noQuirksBodyHtml": "<object></object>" + } + }, + { + "data": "<!doctype html><table><frameset>", + "errors": [ + "(1,32): unexpected-start-tag-implies-table-voodoo", + "(1,32): unexpected-start-tag", + "(1,32): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table></table></body></html>", + "noQuirksBodyHtml": "<table></table>" + } + }, + { + "data": "<!doctype html><area><frameset>", + "errors": [ + "(1,31): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "area": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "area" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><area></body></html>", + "noQuirksBodyHtml": "<area>" + } + }, + { + "data": "<!doctype html><basefont><frameset>", + "errors": [ + "(1,35): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "basefont": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "basefont" + } + ] + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><basefont></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<basefont>" + } + }, + { + "data": "<!doctype html><bgsound><frameset>", + "errors": [ + "(1,34): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "bgsound": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "bgsound" + } + ] + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><bgsound></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<bgsound>" + } + }, + { + "data": "<!doctype html><br><frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><br></body></html>", + "noQuirksBodyHtml": "<br>" + } + }, + { + "data": "<!doctype html><embed><frameset>", + "errors": [ + "(1,32): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "embed": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "embed" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><embed></body></html>", + "noQuirksBodyHtml": "<embed>" + } + }, + { + "data": "<!doctype html><img><frameset>", + "errors": [ + "(1,30): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "img": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "img" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><img></body></html>", + "noQuirksBodyHtml": "<img>" + } + }, + { + "data": "<!doctype html><input><frameset>", + "errors": [ + "(1,32): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><input></body></html>", + "noQuirksBodyHtml": "<input>" + } + }, + { + "data": "<!doctype html><keygen><frameset>", + "errors": [ + "(1,33): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "keygen": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "keygen" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><keygen></body></html>", + "noQuirksBodyHtml": "<keygen>" + } + }, + { + "data": "<!doctype html><wbr><frameset>", + "errors": [ + "(1,30): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "wbr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "wbr" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><wbr></body></html>", + "noQuirksBodyHtml": "<wbr>" + } + }, + { + "data": "<!doctype html><hr><frameset>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "hr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "hr" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><hr></body></html>", + "noQuirksBodyHtml": "<hr>" + } + }, + { + "data": "<!doctype html><textarea></textarea><frameset>", + "errors": [ + "(1,46): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea></textarea></body></html>", + "noQuirksBodyHtml": "<textarea></textarea>" + } + }, + { + "data": "<!doctype html><xmp></xmp><frameset>", + "errors": [ + "(1,36): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xmp": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xmp" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><xmp></xmp></body></html>", + "noQuirksBodyHtml": "<xmp></xmp>" + } + }, + { + "data": "<!doctype html><iframe></iframe><frameset>", + "errors": [ + "(1,42): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><iframe></iframe></body></html>", + "noQuirksBodyHtml": "<iframe></iframe>" + } + }, + { + "data": "<!doctype html><select></select><frameset>", + "errors": [ + "(1,42): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!doctype html><svg></svg><frameset><frame>", + "errors": [ + "(1,36): unexpected-start-tag", + "(1,43): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<!doctype html><math></math><frameset><frame>", + "errors": [ + "(1,38): unexpected-start-tag", + "(1,45): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<math></math>" + } + }, + { + "data": "<!doctype html><svg><foreignObject><div> <frameset><frame>", + "errors": [ + "(1,51): unexpected-start-tag", + "(1,58): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<svg><foreignObject><div> </div></foreignObject></svg>" + } + }, + { + "data": "<!doctype html><svg>a</svg><frameset><frame>", + "errors": [ + "(1,37): unexpected-start-tag", + "(1,44): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg>a</svg></body></html>", + "noQuirksBodyHtml": "<svg>a</svg>" + } + }, + { + "data": "<!doctype html><svg> </svg><frameset><frame>", + "errors": [ + "(1,37): unexpected-start-tag", + "(1,44): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "frame": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "tag": "frame" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset><frame></frameset></html>", + "noQuirksBodyHtml": "<svg> </svg>" + } + }, + { + "data": "<html>aaa<frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,19): unexpected-start-tag", + "(1,30): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "aaa" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>aaa</body></html>", + "noQuirksBodyHtml": "aaa" + } + }, + { + "data": "<html> a <frameset></frameset>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,19): unexpected-start-tag", + "(1,30): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "a " + } + ] + } + ] + } + ], + "html": "<html><head></head><body>a </body></html>", + "noQuirksBodyHtml": " a " + } + }, + { + "data": "<!doctype html><div><frameset>", + "errors": [ + "(1,30): unexpected-start-tag", + "(1,30): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<!doctype html><div><body><frameset>", + "errors": [ + "(1,26): unexpected-start-tag", + "(1,36): unexpected-start-tag", + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<!doctype html><p><math></p>a", + "errors": [ + "(1,28): unexpected-end-tag", + "(1,28): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math></math></p>a</body></html>", + "noQuirksBodyHtml": "<p><math></math></p>a" + } + }, + { + "data": "<!doctype html><p><math><mn><span></p>a", + "errors": [ + "(1,38): unexpected-end-tag", + "(1,39): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "math math": true, + "math mn": true, + "span": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "p" + }, + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><math><mn><span><p></p>a</span></mn></math></p></body></html>", + "noQuirksBodyHtml": "<p><math><mn><span><p></p>a</span></mn></math></p>" + } + }, + { + "data": "<!doctype html><math></html>", + "errors": [ + "(1,28): unexpected-end-tag", + "(1,28): expected-one-end-tag-but-got-another", + "(1,28): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math></math></body></html>", + "noQuirksBodyHtml": "<math></math>" + } + }, + { + "data": "<!doctype html><meta charset=\"ascii\">", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "meta", + "attrs": [ + { + "name": "charset", + "value": "ascii" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><meta charset=\"ascii\"></head><body></body></html>", + "noQuirksBodyHtml": "<meta charset=\"ascii\">" + } + }, + { + "data": "<!doctype html><meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\">", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "meta", + "attrs": [ + { + "name": "content", + "value": "text/html;charset=ascii" + }, + { + "name": "http-equiv", + "value": "content-type" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\"></head><body></body></html>", + "noQuirksBodyHtml": "<meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\">" + } + }, + { + "data": "<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\">", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "comment": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "tag": "meta", + "attrs": [ + { + "name": "charset", + "value": "utf8" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\"></head><body></body></html>", + "noQuirksBodyHtml": "<!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\">" + } + }, + { + "data": "<!doctype html><html a=b><head></head><html c=d>", + "errors": [ + "(1,48): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "a", + "value": "b" + }, + { + "name": "c", + "value": "d" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html a=\"b\" c=\"d\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!doctype html><image/>", + "errors": [ + "(1,23): image-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "img": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "img" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><img></body></html>", + "noQuirksBodyHtml": "<img>" + } + }, + { + "data": "<!doctype html>a<i>b<table>c<b>d</i>e</b>f", + "errors": [ + "(1,28): foster-parenting-character", + "(1,31): foster-parenting-start-tag", + "(1,32): foster-parenting-character", + "(1,36): foster-parenting-end-tag", + "(1,36): adoption-agency-1.3", + "(1,37): foster-parenting-character", + "(1,41): foster-parenting-end-tag", + "(1,42): foster-parenting-character", + "(1,42): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "a" + }, + { + "tag": "i", + "children": [ + { + "text": "bc" + }, + { + "tag": "b", + "children": [ + { + "text": "de" + } + ] + }, + { + "text": "f" + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>a<i>bc<b>de</b>f<table></table></i></body></html>", + "noQuirksBodyHtml": "a<i>bc<b>de</b>f<table></table></i>" + } + }, + { + "data": "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f", + "errors": [ + "(1,25): foster-parenting-start-tag", + "(1,26): foster-parenting-character", + "(1,29): foster-parenting-start-tag", + "(1,30): foster-parenting-character", + "(1,35): foster-parenting-start-tag", + "(1,36): foster-parenting-character", + "(1,39): foster-parenting-start-tag", + "(1,40): foster-parenting-character", + "(1,44): foster-parenting-end-tag", + "(1,44): adoption-agency-1.3", + "(1,44): adoption-agency-1.3", + "(1,45): foster-parenting-character", + "(1,49): foster-parenting-end-tag", + "(1,49): adoption-agency-1.3", + "(1,49): adoption-agency-1.3", + "(1,50): foster-parenting-character", + "(1,50): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "div": true, + "a": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + }, + { + "tag": "b", + "children": [ + { + "text": "b" + } + ] + } + ] + }, + { + "tag": "b" + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "c" + }, + { + "tag": "a", + "children": [ + { + "text": "d" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "e" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "f" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div><table></table></body></html>", + "noQuirksBodyHtml": "<i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div><table></table>" + } + }, + { + "data": "<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f", + "errors": [ + "(1,37): adoption-agency-1.3", + "(1,37): adoption-agency-1.3", + "(1,42): adoption-agency-1.3", + "(1,42): adoption-agency-1.3", + "(1,43): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "div": true, + "a": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + }, + { + "tag": "b", + "children": [ + { + "text": "b" + } + ] + } + ] + }, + { + "tag": "b" + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "c" + }, + { + "tag": "a", + "children": [ + { + "text": "d" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "e" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "f" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div></body></html>", + "noQuirksBodyHtml": "<i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div>" + } + }, + { + "data": "<!doctype html><table><i>a<b>b<div>c</i>", + "errors": [ + "(1,25): foster-parenting-start-tag", + "(1,26): foster-parenting-character", + "(1,29): foster-parenting-start-tag", + "(1,30): foster-parenting-character", + "(1,35): foster-parenting-start-tag", + "(1,36): foster-parenting-character", + "(1,40): foster-parenting-end-tag", + "(1,40): adoption-agency-1.3", + "(1,40): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "div": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + }, + { + "tag": "b", + "children": [ + { + "text": "b" + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "c" + } + ] + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><i>a<b>b</b></i><b><div><i>c</i></div></b><table></table></body></html>", + "noQuirksBodyHtml": "<i>a<b>b</b></i><b><div><i>c</i></div></b><table></table>" + } + }, + { + "data": "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f", + "errors": [ + "(1,25): foster-parenting-start-tag", + "(1,26): foster-parenting-character", + "(1,29): foster-parenting-start-tag", + "(1,30): foster-parenting-character", + "(1,35): foster-parenting-start-tag", + "(1,36): foster-parenting-character", + "(1,39): foster-parenting-start-tag", + "(1,40): foster-parenting-character", + "(1,44): foster-parenting-end-tag", + "(1,44): adoption-agency-1.3", + "(1,44): adoption-agency-1.3", + "(1,45): foster-parenting-character", + "(1,49): foster-parenting-end-tag", + "(1,44): adoption-agency-1.3", + "(1,44): adoption-agency-1.3", + "(1,50): foster-parenting-character", + "(1,50): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "b": true, + "div": true, + "a": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + }, + { + "tag": "b", + "children": [ + { + "text": "b" + } + ] + } + ] + }, + { + "tag": "b" + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "c" + }, + { + "tag": "a", + "children": [ + { + "text": "d" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "e" + } + ] + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "f" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div><table></table></body></html>", + "noQuirksBodyHtml": "<i>a<b>b</b></i><b></b><div><b><i>c<a>d</a></i><a>e</a></b><a>f</a></div><table></table>" + } + }, + { + "data": "<!doctype html><table><i>a<div>b<tr>c<b>d</i>e", + "errors": [ + "(1,25): foster-parenting-start-tag", + "(1,26): foster-parenting-character", + "(1,31): foster-parenting-start-tag", + "(1,32): foster-parenting-character", + "(1,37): foster-parenting-character", + "(1,40): foster-parenting-start-tag", + "(1,41): foster-parenting-character", + "(1,45): foster-parenting-end-tag", + "(1,45): adoption-agency-1.3", + "(1,46): foster-parenting-character", + "(1,46): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "i": true, + "div": true, + "b": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + }, + { + "tag": "div", + "children": [ + { + "text": "b" + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": "c" + }, + { + "tag": "b", + "children": [ + { + "text": "d" + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "text": "e" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><i>a<div>b</div></i><i>c<b>d</b></i><b>e</b><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<i>a<div>b</div></i><i>c<b>d</b></i><b>e</b><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><table><td><table><i>a<div>b<b>c</i>d", + "errors": [ + "(1,26): unexpected-cell-in-table-body", + "(1,36): foster-parenting-start-tag", + "(1,37): foster-parenting-character", + "(1,42): foster-parenting-start-tag", + "(1,43): foster-parenting-character", + "(1,46): foster-parenting-start-tag", + "(1,47): foster-parenting-character", + "(1,51): foster-parenting-end-tag", + "(1,51): adoption-agency-1.3", + "(1,51): adoption-agency-1.3", + "(1,52): foster-parenting-character", + "(1,52): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true, + "div": true, + "b": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "a" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "b" + }, + { + "tag": "b", + "children": [ + { + "text": "c" + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "text": "d" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><i>a</i><div><i>b<b>c</b></i><b>d</b></div><table></table></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><i>a</i><div><i>b<b>c</b></i><b>d</b></div><table></table></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><body><bgsound>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "bgsound": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "bgsound" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><bgsound></body></html>", + "noQuirksBodyHtml": "<bgsound>" + } + }, + { + "data": "<!doctype html><body><basefont>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "basefont": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "basefont" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><basefont></body></html>", + "noQuirksBodyHtml": "<basefont>" + } + }, + { + "data": "<!doctype html><a><b></a><basefont>", + "errors": [ + "(1,25): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "basefont": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "basefont" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><a><b></b></a><basefont></body></html>", + "noQuirksBodyHtml": "<a><b></b></a><basefont>" + } + }, + { + "data": "<!doctype html><a><b></a><bgsound>", + "errors": [ + "(1,25): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "bgsound": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "bgsound" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><a><b></b></a><bgsound></body></html>", + "noQuirksBodyHtml": "<a><b></b></a><bgsound>" + } + }, + { + "data": "<!doctype html><figcaption><article></figcaption>a", + "errors": [ + "(1,49): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "figcaption": true, + "article": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "figcaption", + "children": [ + { + "tag": "article" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><figcaption><article></article></figcaption>a</body></html>", + "noQuirksBodyHtml": "<figcaption><article></article></figcaption>a" + } + }, + { + "data": "<!doctype html><summary><article></summary>a", + "errors": [ + "(1,43): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "summary": true, + "article": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "summary", + "children": [ + { + "tag": "article" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><summary><article></article></summary>a</body></html>", + "noQuirksBodyHtml": "<summary><article></article></summary>a" + } + }, + { + "data": "<!doctype html><p><a><plaintext>b", + "errors": [ + "(1,32): unexpected-end-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "a": true, + "plaintext": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "a" + } + ] + }, + { + "tag": "plaintext", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "b" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><a></a></p><plaintext><a>b</a></plaintext></body></html>", + "noQuirksBodyHtml": "<p><a></a></p><plaintext><a>b</a></plaintext>" + } + }, + { + "data": "<!DOCTYPE html><div>a<a></div>b<p>c</p>d", + "errors": [ + "(1,30): end-tag-too-early", + "(1,40): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "a": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "a" + }, + { + "tag": "a" + } + ] + }, + { + "tag": "a", + "children": [ + { + "text": "b" + }, + { + "tag": "p", + "children": [ + { + "text": "c" + } + ] + }, + { + "text": "d" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div>a<a></a></div><a>b<p>c</p>d</a></body></html>", + "noQuirksBodyHtml": "<div>a<a></a></div><a>b<p>c</p>d</a>" + } + } + ], + "tests2.dat": [ + { + "data": "<!DOCTYPE html>Test", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Test" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>Test</body></html>", + "noQuirksBodyHtml": "Test" + } + }, + { + "data": "<textarea>test</div>test", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,24): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "test</div>test", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>test&lt;/div&gt;test</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>test&lt;/div&gt;test</textarea>" + } + }, + { + "data": "<table><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,11): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><td>test</tbody></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "test" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>test</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>test</td></tr></tbody></table>" + } + }, + { + "data": "<frame>test", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,7): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "test" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>test</body></html>", + "noQuirksBodyHtml": "test" + } + }, + { + "data": "<!DOCTYPE html><frameset>test", + "errors": [ + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "test" + } + }, + { + "data": "<!DOCTYPE html><frameset> te st", + "errors": [ + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): unexpected-char-in-frameset", + "(1,29): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "text": " " + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset> </frameset></html>", + "noQuirksBodyHtml": " te st" + } + }, + { + "data": "<!DOCTYPE html><frameset></frameset> te st", + "errors": [ + "(1,29): unexpected-char-after-frameset", + "(1,29): unexpected-char-after-frameset", + "(1,29): unexpected-char-after-frameset", + "(1,29): unexpected-char-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": " " + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset> </html>", + "noQuirksBodyHtml": " te st" + } + }, + { + "data": "<!DOCTYPE html><frameset><!DOCTYPE html>", + "errors": [ + "(1,40): unexpected-doctype", + "(1,40): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html><font><p><b>test</font>", + "errors": [ + "(1,38): adoption-agency-1.3", + "(1,38): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "p": true, + "b": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font" + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "test" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><font></font><p><font><b>test</b></font></p></body></html>", + "noQuirksBodyHtml": "<font></font><p><font><b>test</b></font></p>" + } + }, + { + "data": "<!DOCTYPE html><dt><div><dd>", + "errors": [ + "(1,28): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dt": true, + "div": true, + "dd": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dt", + "children": [ + { + "tag": "div" + } + ] + }, + { + "tag": "dd" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><dt><div></div></dt><dd></dd></body></html>", + "noQuirksBodyHtml": "<dt><div></div></dt><dd></dd>" + } + }, + { + "data": "<script></x", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,11): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "</x", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></x</script></head><body></body></html>", + "noQuirksBodyHtml": "<script></x</script>" + } + }, + { + "data": "<table><plaintext><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,18): unexpected-start-tag-implies-table-voodoo", + "(1,22): foster-parenting-character-in-table", + "(1,22): foster-parenting-character-in-table", + "(1,22): foster-parenting-character-in-table", + "(1,22): foster-parenting-character-in-table", + "(1,22): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true, + "table": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "<td>", + "no_escape": true + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><plaintext><td></plaintext><table></table></body></html>", + "noQuirksBodyHtml": "<plaintext><td></plaintext><table></table>" + } + }, + { + "data": "<plaintext></plaintext>", + "errors": [ + "(1,11): expected-doctype-but-got-start-tag", + "(1,23): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "</plaintext>", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><plaintext></plaintext></plaintext></body></html>", + "noQuirksBodyHtml": "<plaintext></plaintext></plaintext>" + } + }, + { + "data": "<!DOCTYPE html><table><tr>TEST", + "errors": [ + "(1,30): foster-parenting-character-in-table", + "(1,30): foster-parenting-character-in-table", + "(1,30): foster-parenting-character-in-table", + "(1,30): foster-parenting-character-in-table", + "(1,30): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "TEST" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>TEST<table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "TEST<table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4>", + "errors": [ + "(1,37): unexpected-start-tag", + "(1,53): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "t1", + "value": "1" + }, + { + "name": "t2", + "value": "2" + }, + { + "name": "t3", + "value": "3" + }, + { + "name": "t4", + "value": "4" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body t1=\"1\" t2=\"2\" t3=\"3\" t4=\"4\"></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</b test", + "errors": [ + "(1,8): eof-in-attribute-name", + "(1,8): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html></b test<b &=&amp>X", + "errors": [ + "(1,24): invalid-character-in-attribute-name", + "(1,32): named-entity-without-semicolon", + "(1,33): attributes-in-end-tag", + "(1,33): unexpected-end-tag-before-html" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X</body></html>", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt", + "errors": [ + "(1,9): need-space-after-doctype", + "(1,54): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "attrs": [ + { + "name": "type", + "value": "text/x-foobar;baz" + } + ], + "children": [ + { + "text": "X</SCRipt", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script type=\"text/x-foobar;baz\">X</SCRipt</script></head><body></body></html>", + "noQuirksBodyHtml": "<script type=\"text/x-foobar;baz\">X</SCRipt</script>" + } + }, + { + "data": "&", + "errors": [ + "(1,1): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;</body></html>", + "noQuirksBodyHtml": "&amp;" + } + }, + { + "data": "&#", + "errors": [ + "(1,2): expected-numeric-entity", + "(1,2): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&#", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;#</body></html>", + "noQuirksBodyHtml": "&amp;#" + } + }, + { + "data": "&#X", + "errors": [ + "(1,3): expected-numeric-entity", + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&#X", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;#X</body></html>", + "noQuirksBodyHtml": "&amp;#X" + } + }, + { + "data": "&#x", + "errors": [ + "(1,3): expected-numeric-entity", + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&#x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;#x</body></html>", + "noQuirksBodyHtml": "&amp;#x" + } + }, + { + "data": "&#45", + "errors": [ + "(1,4): numeric-entity-without-semicolon", + "(1,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "-" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>-</body></html>", + "noQuirksBodyHtml": "-" + } + }, + { + "data": "&x-test", + "errors": [ + "(1,2): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&x-test", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;x-test</body></html>", + "noQuirksBodyHtml": "&amp;x-test" + } + }, + { + "data": "<!doctypehtml><p><li>", + "errors": [ + "(1,9): need-space-after-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "li": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "li" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><li></li></body></html>", + "noQuirksBodyHtml": "<p></p><li></li>" + } + }, + { + "data": "<!doctypehtml><p><dt>", + "errors": [ + "(1,9): need-space-after-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "dt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "dt" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><dt></dt></body></html>", + "noQuirksBodyHtml": "<p></p><dt></dt>" + } + }, + { + "data": "<!doctypehtml><p><dd>", + "errors": [ + "(1,9): need-space-after-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "dd": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "dd" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><dd></dd></body></html>", + "noQuirksBodyHtml": "<p></p><dd></dd>" + } + }, + { + "data": "<!doctypehtml><p><form>", + "errors": [ + "(1,9): need-space-after-doctype", + "(1,23): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "form" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><form></form></body></html>", + "noQuirksBodyHtml": "<p></p><form></form>" + } + }, + { + "data": "<!DOCTYPE html><p></P>X", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p>X</body></html>", + "noQuirksBodyHtml": "<p></p>X" + } + }, + { + "data": "&AMP", + "errors": [ + "(1,4): named-entity-without-semicolon", + "(1,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;</body></html>", + "noQuirksBodyHtml": "&amp;" + } + }, + { + "data": "&AMp;", + "errors": [ + "(1,3): expected-named-entity", + "(1,3): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "&AMp;", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&amp;AMp;</body></html>", + "noQuirksBodyHtml": "&amp;AMp;" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>", + "errors": [ + "(1,110): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly></thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly></body></html>", + "noQuirksBodyHtml": "<thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly></thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>" + } + }, + { + "data": "<!DOCTYPE html>X</body>X", + "errors": [ + "(1,24): unexpected-char-after-body" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "XX" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>XX</body></html>", + "noQuirksBodyHtml": "XX" + } + }, + { + "data": "<!DOCTYPE html><!-- X", + "errors": [ + "(1,21): eof-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "comment": " X" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><!-- X--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- X-->" + } + }, + { + "data": "<!DOCTYPE html><table><caption>test TEST</caption><td>test", + "errors": [ + "(1,54): unexpected-cell-in-table-body", + "(1,58): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "tbody": true, + "tr": true, + "td": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "text": "test TEST" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "test" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption>test TEST</caption><tbody><tr><td>test</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><caption>test TEST</caption><tbody><tr><td>test</td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><select><option><optgroup>", + "errors": [ + "(1,41): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true, + "optgroup": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + }, + { + "tag": "optgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option><optgroup></optgroup></select></body></html>", + "noQuirksBodyHtml": "<select><option></option><optgroup></optgroup></select>" + } + }, + { + "data": "<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>", + "errors": [ + "(1,68): unexpected-select-in-select", + "(1,76): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "optgroup": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "optgroup", + "children": [ + { + "tag": "option" + } + ] + }, + { + "tag": "option" + } + ] + }, + { + "tag": "option" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><optgroup><option></option></optgroup><option></option></select><option></option></body></html>", + "noQuirksBodyHtml": "<select><optgroup><option></option></optgroup><option></option></select><option></option>" + } + }, + { + "data": "<!DOCTYPE html><select><optgroup><option><optgroup>", + "errors": [ + "(1,51): eof-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "optgroup": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "optgroup", + "children": [ + { + "tag": "option" + } + ] + }, + { + "tag": "optgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><optgroup><option></option></optgroup><optgroup></optgroup></select></body></html>", + "noQuirksBodyHtml": "<select><optgroup><option></option></optgroup><optgroup></optgroup></select>" + } + }, + { + "data": "<!DOCTYPE html><datalist><option>foo</datalist>bar", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "datalist": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "datalist", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "foo" + } + ] + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><datalist><option>foo</option></datalist>bar</body></html>", + "noQuirksBodyHtml": "<datalist><option>foo</option></datalist>bar" + } + }, + { + "data": "<!DOCTYPE html><font><input><input></font>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "input" + }, + { + "tag": "input" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><font><input><input></font></body></html>", + "noQuirksBodyHtml": "<font><input><input></font>" + } + }, + { + "data": "<!DOCTYPE html><!-- XXX - XXX -->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "comment": " XXX - XXX " + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><!-- XXX - XXX --><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- XXX - XXX -->" + } + }, + { + "data": "<!DOCTYPE html><!-- XXX - XXX", + "errors": [ + "(1,29): eof-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "comment": " XXX - XXX" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><!-- XXX - XXX--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- XXX - XXX-->" + } + }, + { + "data": "<!DOCTYPE html><!-- XXX - XXX - XXX -->", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "comment": " XXX - XXX - XXX " + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><!-- XXX - XXX - XXX --><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- XXX - XXX - XXX -->" + } + }, + { + "data": "<isindex test=x name=x>", + "errors": [ + "(1,23): expected-doctype-but-got-start-tag", + "(1,23): deprecated-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "hr": true, + "label": true, + "input": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + }, + { + "name": "test", + "value": "x" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\" test=\"x\"></label><hr></form></body></html>", + "noQuirksBodyHtml": "<form><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\" test=\"x\"></label><hr></form>" + } + }, + { + "data": "test\ntest", + "errors": [ + "(2,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "test\ntest" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>test\ntest</body></html>", + "noQuirksBodyHtml": "test\ntest" + } + }, + { + "data": "<!DOCTYPE html><body><title>test</body></title>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "title": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "test</body>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><title>test&lt;/body&gt;</title></body></html>", + "noQuirksBodyHtml": "<title>test&lt;/body&gt;</title>" + } + }, + { + "data": "<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>\nx { content:\"</style\" } </style>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "title": true, + "meta": true, + "link": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + }, + { + "tag": "meta", + "attrs": [ + { + "name": "name", + "value": "z" + } + ] + }, + { + "tag": "link", + "attrs": [ + { + "name": "rel", + "value": "foo" + } + ] + }, + { + "tag": "style", + "children": [ + { + "text": "\nx { content:\"</style\" } ", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><title>X</title><meta name=\"z\"><link rel=\"foo\"><style>\nx { content:\"</style\" } </style></body></html>", + "noQuirksBodyHtml": "<title>X</title><meta name=\"z\"><link rel=\"foo\"><style>\nx { content:\"</style\" } </style>" + } + }, + { + "data": "<!DOCTYPE html><select><optgroup></optgroup></select>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "optgroup": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "optgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><optgroup></optgroup></select></body></html>", + "noQuirksBodyHtml": "<select><optgroup></optgroup></select>" + } + }, + { + "data": " \n ", + "errors": [ + "(2,1): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": " \n " + } + }, + { + "data": "<!DOCTYPE html> <html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!DOCTYPE html><script>\n</script> <title>x</title> </head>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "title": true, + "body": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": "\n", + "no_escape": true + } + ] + }, + { + "text": " " + }, + { + "tag": "title", + "children": [ + { + "text": "x" + } + ] + }, + { + "text": " " + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><script>\n</script> <title>x</title> </head><body></body></html>", + "noQuirksBodyHtml": "<script>\n</script> <title>x</title> " + } + }, + { + "data": "<!DOCTYPE html><html><body><html id=x>", + "errors": [ + "(1,38): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "id", + "value": "x" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html id=\"x\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html>X</body><html id=\"x\">", + "errors": [ + "(1,36): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "id", + "value": "x" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html id=\"x\"><head></head><body>X</body></html>", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<!DOCTYPE html><head><html id=x>", + "errors": [ + "(1,32): non-html-root" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "attrs": [ + { + "name": "id", + "value": "x" + } + ], + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html id=\"x\"><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE html>X</html>X", + "errors": [ + "(1,24): expected-eof-but-got-char" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "XX" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>XX</body></html>", + "noQuirksBodyHtml": "XX" + } + }, + { + "data": "<!DOCTYPE html>X</html> ", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X " + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X </body></html>", + "noQuirksBodyHtml": "X " + } + }, + { + "data": "<!DOCTYPE html>X</html><p>X", + "errors": [ + "(1,26): expected-eof-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "p", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X<p>X</p></body></html>", + "noQuirksBodyHtml": "X<p>X</p>" + } + }, + { + "data": "<!DOCTYPE html>X<p/x/y/z>", + "errors": [ + "(1,19): unexpected-character-after-solidus-in-tag", + "(1,21): unexpected-character-after-solidus-in-tag", + "(1,23): unexpected-character-after-solidus-in-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "p", + "attrs": [ + { + "name": "x", + "value": "" + }, + { + "name": "y", + "value": "" + }, + { + "name": "z", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X<p x=\"\" y=\"\" z=\"\"></p></body></html>", + "noQuirksBodyHtml": "X<p x=\"\" y=\"\" z=\"\"></p>" + } + }, + { + "data": "<!DOCTYPE html><!--x--", + "errors": [ + "(1,22): eof-in-comment-double-dash" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "comment": "x" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><!--x--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!--x-->" + } + }, + { + "data": "<!DOCTYPE html><table><tr><td></p></table>", + "errors": [ + "(1,34): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><p></p></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><p></p></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->", + "errors": [ + "(1,20): expected-space-or-right-bracket-in-doctype", + "(1,25): unknown-doctype", + "(1,35): unexpected-char-in-comment" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true, + "escaped": true, + "comment": true + }, + "tree": [ + { + "doctype": "<!doctype" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": ">", + "escaped": true + }, + { + "comment": "<!--x" + }, + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<!DOCTYPE <!doctype><html><head></head><body>&gt;<!--<!--x-->--&gt;</body></html>", + "noQuirksBodyHtml": "&gt;<!--<!--x-->--&gt;" + } + }, + { + "data": "<!doctype html><div><form></form><div></div></div>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "form" + }, + { + "tag": "div" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div><form></form><div></div></div></body></html>", + "noQuirksBodyHtml": "<div><form></form><div></div></div>" + } + } + ], + "tests20.dat": [ + { + "data": "<!doctype html><p><button><button>", + "errors": [ + "(1,34): unexpected-start-tag-implies-end-tag", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button" + }, + { + "tag": "button" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button></button><button></button></p></body></html>", + "noQuirksBodyHtml": "<p><button></button><button></button></p>" + } + }, + { + "data": "<!doctype html><p><button><address>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "address": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "address" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><address></address></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><address></address></button></p>" + } + }, + { + "data": "<!doctype html><p><button><blockquote>", + "errors": [ + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "blockquote": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "blockquote" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><blockquote></blockquote></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><blockquote></blockquote></button></p>" + } + }, + { + "data": "<!doctype html><p><button><menu>", + "errors": [ + "(1,32): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "menu": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "menu" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><menu></menu></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><menu></menu></button></p>" + } + }, + { + "data": "<!doctype html><p><button><p>", + "errors": [ + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><p></p></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><p></p></button></p>" + } + }, + { + "data": "<!doctype html><p><button><ul>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "ul": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "ul" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><ul></ul></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><ul></ul></button></p>" + } + }, + { + "data": "<!doctype html><p><button><h1>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "h1": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "h1" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><h1></h1></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><h1></h1></button></p>" + } + }, + { + "data": "<!doctype html><p><button><h6>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "h6": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "h6" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><h6></h6></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><h6></h6></button></p>" + } + }, + { + "data": "<!doctype html><p><button><listing>", + "errors": [ + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "listing": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "listing" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><listing></listing></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><listing></listing></button></p>" + } + }, + { + "data": "<!doctype html><p><button><pre>", + "errors": [ + "(1,31): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "pre" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><pre></pre></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><pre></pre></button></p>" + } + }, + { + "data": "<!doctype html><p><button><form>", + "errors": [ + "(1,32): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><form></form></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><form></form></button></p>" + } + }, + { + "data": "<!doctype html><p><button><li>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "li": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "li" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><li></li></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><li></li></button></p>" + } + }, + { + "data": "<!doctype html><p><button><dd>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "dd": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "dd" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><dd></dd></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><dd></dd></button></p>" + } + }, + { + "data": "<!doctype html><p><button><dt>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "dt": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "dt" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><dt></dt></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><dt></dt></button></p>" + } + }, + { + "data": "<!doctype html><p><button><plaintext>", + "errors": [ + "(1,37): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "plaintext": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "plaintext" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><plaintext></plaintext></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><plaintext></plaintext></button></p>" + } + }, + { + "data": "<!doctype html><p><button><table>", + "errors": [ + "(1,33): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><table></table></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><table></table></button></p>" + } + }, + { + "data": "<!doctype html><p><button><hr>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "hr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "hr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><hr></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><hr></button></p>" + } + }, + { + "data": "<!doctype html><p><button><xmp>", + "errors": [ + "(1,31): expected-named-closing-tag-but-got-eof", + "(1,31): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true, + "xmp": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "xmp" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><xmp></xmp></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><xmp></xmp></button></p>" + } + }, + { + "data": "<!doctype html><p><button></p>", + "errors": [ + "(1,30): unexpected-end-tag", + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><button><p></p></button></p></body></html>", + "noQuirksBodyHtml": "<p><button><p></p></button></p>" + } + }, + { + "data": "<!doctype html><address><button></address>a", + "errors": [ + "(1,42): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "address": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "address", + "children": [ + { + "tag": "button" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><address><button></button></address>a</body></html>", + "noQuirksBodyHtml": "<address><button></button></address>a" + } + }, + { + "data": "<!doctype html><address><button></address>a", + "errors": [ + "(1,42): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "address": true, + "button": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "address", + "children": [ + { + "tag": "button" + } + ] + }, + { + "text": "a" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><address><button></button></address>a</body></html>", + "noQuirksBodyHtml": "<address><button></button></address>a" + } + }, + { + "data": "<p><table></p>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,14): unexpected-end-tag-implies-table-voodoo", + "(1,14): unexpected-end-tag", + "(1,14): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "p" + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><p></p><table></table></p></body></html>", + "noQuirksBodyHtml": "<p></p><p></p><table></table>" + } + }, + { + "data": "<!doctype html><svg>", + "errors": [ + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<!doctype html><p><figcaption>", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "figcaption": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "figcaption" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><figcaption></figcaption></body></html>", + "noQuirksBodyHtml": "<p></p><figcaption></figcaption>" + } + }, + { + "data": "<!doctype html><p><summary>", + "errors": [ + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "summary": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "summary" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><summary></summary></body></html>", + "noQuirksBodyHtml": "<p></p><summary></summary>" + } + }, + { + "data": "<!doctype html><form><table><form>", + "errors": [ + "(1,34): unexpected-form-in-table", + "(1,34): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><table></table></form></body></html>", + "noQuirksBodyHtml": "<form><table></table></form>" + } + }, + { + "data": "<!doctype html><table><form><form>", + "errors": [ + "(1,28): unexpected-form-in-table", + "(1,34): unexpected-form-in-table", + "(1,34): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><form></form></table></body></html>", + "noQuirksBodyHtml": "<table><form></form></table>" + } + }, + { + "data": "<!doctype html><table><form></table><form>", + "errors": [ + "(1,28): unexpected-form-in-table", + "(1,42): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "form": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><form></form></table></body></html>", + "noQuirksBodyHtml": "<table><form></form></table>" + } + }, + { + "data": "<!doctype html><svg><foreignObject><p>", + "errors": [ + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><foreignObject><p></p></foreignObject></svg></body></html>", + "noQuirksBodyHtml": "<svg><foreignObject><p></p></foreignObject></svg>" + } + }, + { + "data": "<!doctype html><svg><title>abc", + "errors": [ + "(1,30): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg title": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "abc" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><title>abc</title></svg></body></html>", + "noQuirksBodyHtml": "<svg><title>abc</title></svg>" + } + }, + { + "data": "<option><span><option>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,22): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "option": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "option", + "children": [ + { + "tag": "span", + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><option><span><option></option></span></option></body></html>", + "noQuirksBodyHtml": "<option><span><option></option></span></option>" + } + }, + { + "data": "<option><option>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "option": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "option" + }, + { + "tag": "option" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><option></option><option></option></body></html>", + "noQuirksBodyHtml": "<option></option><option></option>" + } + }, + { + "data": "<math><annotation-xml><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): unexpected-html-element-in-foreign-content", + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + }, + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml></annotation-xml></math><div></div></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\"application/svg+xml\"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,58): unexpected-html-element-in-foreign-content", + "(1,58): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": "application/svg+xml" + } + ] + } + ] + }, + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\"application/svg+xml\"></annotation-xml></math><div></div></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\"application/svg+xml\"><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\"application/xhtml+xml\"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,60): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": "application/xhtml+xml" + } + ], + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\"application/xhtml+xml\"><div></div></annotation-xml></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\"application/xhtml+xml\"><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,60): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": "aPPlication/xhtmL+xMl" + } + ], + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div></div></annotation-xml></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\"text/html\"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,48): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": "text/html" + } + ], + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\"text/html\"><div></div></annotation-xml></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\"text/html\"><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\"Text/htmL\"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,48): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": "Text/htmL" + } + ], + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\"Text/htmL\"><div></div></annotation-xml></math></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\"Text/htmL\"><div></div></annotation-xml></math>" + } + }, + { + "data": "<math><annotation-xml encoding=\" text/html \"><div>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,50): unexpected-html-element-in-foreign-content", + "(1,50): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "encoding", + "value": " text/html " + } + ] + } + ] + }, + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><annotation-xml encoding=\" text/html \"></annotation-xml></math><div></div></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml encoding=\" text/html \"><div></div></annotation-xml></math>" + } + } + ], + "tests21.dat": [ + { + "data": "<svg><![CDATA[foo]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>foo</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo</svg>" + } + }, + { + "data": "<math><![CDATA[foo]]>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math>foo</math></body></html>", + "noQuirksBodyHtml": "<math>foo</math>" + } + }, + { + "data": "<div><![CDATA[foo]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,7): expected-dashes-or-doctype", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "comment": "[CDATA[foo]]" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><!--[CDATA[foo]]--></div></body></html>", + "noQuirksBodyHtml": "<div><!--[CDATA[foo]]--></div>" + } + }, + { + "data": "<svg><![CDATA[foo", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>foo</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo</svg>" + } + }, + { + "data": "<svg><![CDATA[foo", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>foo</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo</svg>" + } + }, + { + "data": "<svg><![CDATA[", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,14): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<svg><![CDATA[]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg></body></html>", + "noQuirksBodyHtml": "<svg></svg>" + } + }, + { + "data": "<svg><![CDATA[]] >]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "]] >", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>]] &gt;</svg></body></html>", + "noQuirksBodyHtml": "<svg>]] &gt;</svg>" + } + }, + { + "data": "<svg><![CDATA[]] >]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "]] >", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>]] &gt;</svg></body></html>", + "noQuirksBodyHtml": "<svg>]] &gt;</svg>" + } + }, + { + "data": "<svg><![CDATA[]]", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "]]" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>]]</svg></body></html>", + "noQuirksBodyHtml": "<svg>]]</svg>" + } + }, + { + "data": "<svg><![CDATA[]", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "]" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>]</svg></body></html>", + "noQuirksBodyHtml": "<svg>]</svg>" + } + }, + { + "data": "<svg><![CDATA[]>a", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "]>a", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>]&gt;a</svg></body></html>", + "noQuirksBodyHtml": "<svg>]&gt;a</svg>" + } + }, + { + "data": "<!DOCTYPE html><svg><![CDATA[foo]]]>", + "errors": [ + "(1,36): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo]" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg>foo]</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo]</svg>" + } + }, + { + "data": "<!DOCTYPE html><svg><![CDATA[foo]]]]>", + "errors": [ + "(1,37): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo]]" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg>foo]]</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo]]</svg>" + } + }, + { + "data": "<!DOCTYPE html><svg><![CDATA[foo]]]]]>", + "errors": [ + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "foo]]]" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg>foo]]]</svg></body></html>", + "noQuirksBodyHtml": "<svg>foo]]]</svg>" + } + }, + { + "data": "<svg><foreignObject><div><![CDATA[foo]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,27): expected-dashes-or-doctype", + "(1,40): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true, + "div": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div", + "children": [ + { + "comment": "[CDATA[foo]]" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><foreignObject><div><!--[CDATA[foo]]--></div></foreignObject></svg></body></html>", + "noQuirksBodyHtml": "<svg><foreignObject><div><!--[CDATA[foo]]--></div></foreignObject></svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,22): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;</svg>" + } + }, + { + "data": "<svg><![CDATA[</svg>a]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,24): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "</svg>a", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;/svg&gt;a</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;/svg&gt;a</svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>a", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>a", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;a</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;a</svg>" + } + }, + { + "data": "<svg><![CDATA[</svg>a", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "</svg>a", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;/svg&gt;a</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;/svg&gt;a</svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>]]><path>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,28): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg path": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>", + "escaped": true + }, + { + "tag": "path", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;<path></path></svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;<path></path></svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>]]></path>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,29): unexpected-end-tag", + "(1,29): unexpected-end-tag", + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;</svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>]]><!--path-->", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>", + "escaped": true + }, + { + "comment": "path" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;<!--path--></svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;<!--path--></svg>" + } + }, + { + "data": "<svg><![CDATA[<svg>]]>path", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<svg>path", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;svg&gt;path</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;svg&gt;path</svg>" + } + }, + { + "data": "<svg><![CDATA[<!--svg-->]]>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "text": "<!--svg-->", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg>&lt;!--svg--&gt;</svg></body></html>", + "noQuirksBodyHtml": "<svg>&lt;!--svg--&gt;</svg>" + } + } + ], + "tests22.dat": [ + { + "data": "<a><b><big><em><strong><div>X</a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,33): adoption-agency-1.3", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "big": true, + "em": true, + "strong": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "big", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "strong" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "big", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "strong", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><b><big><em><strong></strong></em></big></b></a><big><em><strong><div><a>X</a></div></strong></em></big></body></html>", + "noQuirksBodyHtml": "<a><b><big><em><strong></strong></em></big></b></a><big><em><strong><div><a>X</a></div></strong></em></big>" + } + }, + { + "data": "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8>A</a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): adoption-agency-1.3", + "(1,91): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "1" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "2" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "3" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "4" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "5" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "6" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "7" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "8" + } + ], + "children": [ + { + "tag": "a", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a>A</a></div></div></div></div></div></div></div></div></b></body></html>", + "noQuirksBodyHtml": "<a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a>A</a></div></div></div></div></div></div></div></div></b>" + } + }, + { + "data": "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9>A</a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): adoption-agency-1.3", + "(1,101): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "1" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "2" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "3" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "4" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "5" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "6" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "7" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "8" + } + ], + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "9" + } + ], + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a><div id=\"9\">A</div></a></div></div></div></div></div></div></div></div></b></body></html>", + "noQuirksBodyHtml": "<a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a><div id=\"9\">A</div></a></div></div></div></div></div></div></div></div></b>" + } + }, + { + "data": "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9><div id=10>A</a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): adoption-agency-1.3", + "(1,112): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "b": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "b", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "1" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "2" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "3" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "4" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "5" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "6" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "7" + } + ], + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "8" + } + ], + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "9" + } + ], + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "10" + } + ], + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a><div id=\"9\"><div id=\"10\">A</div></div></a></div></div></div></div></div></div></div></div></b></body></html>", + "noQuirksBodyHtml": "<a><b></b></a><b><div id=\"1\"><a></a><div id=\"2\"><a></a><div id=\"3\"><a></a><div id=\"4\"><a></a><div id=\"5\"><a></a><div id=\"6\"><a></a><div id=\"7\"><a></a><div id=\"8\"><a><div id=\"9\"><div id=\"10\">A</div></div></a></div></div></div></div></div></div></div></div></b>" + } + }, + { + "data": "<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,46): adoption-agency-1.3", + "(1,50): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "cite": true, + "b": true, + "i": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "cite", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "cite", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "cite", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "cite", + "children": [ + { + "tag": "i" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "i", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "X" + } + ] + }, + { + "text": "TEST" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><cite><b><cite><i><cite><i><cite><i></i></cite></i></cite></i></cite></b><i><i><div><b>X</b>TEST</div></i></i></cite></body></html>", + "noQuirksBodyHtml": "<cite><b><cite><i><cite><i><cite><i></i></cite></i></cite></i></cite></b><i><i><div><b>X</b>TEST</div></i></i></cite>" + } + } + ], + "tests23.dat": [ + { + "data": "<p><font size=4><font color=red><font size=4><font size=4><font size=4><font size=4><font size=4><font color=red><p>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,116): unexpected-end-tag", + "(1,117): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><font size=\"4\"><font color=\"red\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font color=\"red\"></font></font></font></font></font></font></font></font></p><p><font color=\"red\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font color=\"red\">X</font></font></font></font></font></p></body></html>", + "noQuirksBodyHtml": "<p><font size=\"4\"><font color=\"red\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font color=\"red\"></font></font></font></font></font></font></font></font></p><p><font color=\"red\"><font size=\"4\"><font size=\"4\"><font size=\"4\"><font color=\"red\">X</font></font></font></font></font></p>" + } + }, + { + "data": "<p><font size=4><font size=4><font size=4><font size=4><p>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,58): unexpected-end-tag", + "(1,59): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"></font></font></font></font></p><p><font size=\"4\"><font size=\"4\"><font size=\"4\">X</font></font></font></p></body></html>", + "noQuirksBodyHtml": "<p><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"4\"></font></font></font></font></p><p><font size=\"4\"><font size=\"4\"><font size=\"4\">X</font></font></font></p>" + } + }, + { + "data": "<p><font size=4><font size=4><font size=4><font size=\"5\"><font size=4><p>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,73): unexpected-end-tag", + "(1,74): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "5" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "5" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"5\"><font size=\"4\"></font></font></font></font></font></p><p><font size=\"4\"><font size=\"4\"><font size=\"5\"><font size=\"4\">X</font></font></font></font></p></body></html>", + "noQuirksBodyHtml": "<p><font size=\"4\"><font size=\"4\"><font size=\"4\"><font size=\"5\"><font size=\"4\"></font></font></font></font></font></p><p><font size=\"4\"><font size=\"4\"><font size=\"5\"><font size=\"4\">X</font></font></font></font></p>" + } + }, + { + "data": "<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,68): unexpected-end-tag", + "(1,69): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "font": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "id", + "value": "a" + }, + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "id", + "value": "b" + }, + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "id", + "value": "a" + }, + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "id", + "value": "b" + }, + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "4" + } + ], + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><font size=\"4\" id=\"a\"><font size=\"4\" id=\"b\"><font size=\"4\"><font size=\"4\"></font></font></font></font></p><p><font size=\"4\" id=\"a\"><font size=\"4\" id=\"b\"><font size=\"4\"><font size=\"4\">X</font></font></font></font></p></body></html>", + "noQuirksBodyHtml": "<p><font size=\"4\" id=\"a\"><font size=\"4\" id=\"b\"><font size=\"4\"><font size=\"4\"></font></font></font></font></p><p><font size=\"4\" id=\"a\"><font size=\"4\" id=\"b\"><font size=\"4\"><font size=\"4\">X</font></font></font></font></p>" + } + }, + { + "data": "<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,64): end-tag-too-early", + "(1,67): unexpected-end-tag", + "(1,68): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "b": true, + "object": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "object", + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "attrs": [ + { + "name": "id", + "value": "a" + } + ], + "children": [ + { + "tag": "b", + "children": [ + { + "text": "Y" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><b id=\"a\"><b id=\"a\"><b id=\"a\"><b><object><b id=\"a\"><b id=\"a\">X</b></b></object></b></b></b></b></p><p><b id=\"a\"><b id=\"a\"><b id=\"a\"><b>Y</b></b></b></b></p></body></html>", + "noQuirksBodyHtml": "<p><b id=\"a\"><b id=\"a\"><b id=\"a\"><b><object><b id=\"a\"><b id=\"a\">X</b></b></object></b></b></b></b></p><p><b id=\"a\"><b id=\"a\"><b id=\"a\"><b>Y</b></b></b></b></p>" + } + } + ], + "tests24.dat": [ + { + "data": "<!DOCTYPE html>&NotEqualTilde;", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "≂̸" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>≂̸</body></html>", + "noQuirksBodyHtml": "≂̸" + } + }, + { + "data": "<!DOCTYPE html>&NotEqualTilde;A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "≂̸A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>≂̸A</body></html>", + "noQuirksBodyHtml": "≂̸A" + } + }, + { + "data": "<!DOCTYPE html>&ThickSpace;", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "  " + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>  </body></html>", + "noQuirksBodyHtml": "  " + } + }, + { + "data": "<!DOCTYPE html>&ThickSpace;A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "  A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>  A</body></html>", + "noQuirksBodyHtml": "  A" + } + }, + { + "data": "<!DOCTYPE html>&NotSubset;", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "⊂⃒" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>⊂⃒</body></html>", + "noQuirksBodyHtml": "⊂⃒" + } + }, + { + "data": "<!DOCTYPE html>&NotSubset;A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "⊂⃒A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>⊂⃒A</body></html>", + "noQuirksBodyHtml": "⊂⃒A" + } + }, + { + "data": "<!DOCTYPE html>&Gopf;", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "𝔾" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>𝔾</body></html>", + "noQuirksBodyHtml": "𝔾" + } + }, + { + "data": "<!DOCTYPE html>&Gopf;A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "𝔾A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>𝔾A</body></html>", + "noQuirksBodyHtml": "𝔾A" + } + } + ], + "tests25.dat": [ + { + "data": "<!DOCTYPE html><body><foo>A", + "errors": [ + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><foo>A</foo></body></html>", + "noQuirksBodyHtml": "<foo>A</foo>" + } + }, + { + "data": "<!DOCTYPE html><body><area>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "area": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "area" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><area>A</body></html>", + "noQuirksBodyHtml": "<area>A" + } + }, + { + "data": "<!DOCTYPE html><body><base>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "base": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "base" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><base>A</body></html>", + "noQuirksBodyHtml": "<base>A" + } + }, + { + "data": "<!DOCTYPE html><body><basefont>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "basefont": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "basefont" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><basefont>A</body></html>", + "noQuirksBodyHtml": "<basefont>A" + } + }, + { + "data": "<!DOCTYPE html><body><bgsound>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "bgsound": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "bgsound" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><bgsound>A</body></html>", + "noQuirksBodyHtml": "<bgsound>A" + } + }, + { + "data": "<!DOCTYPE html><body><br>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><br>A</body></html>", + "noQuirksBodyHtml": "<br>A" + } + }, + { + "data": "<!DOCTYPE html><body><col>A", + "errors": [ + "(1,26): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>A</body></html>", + "noQuirksBodyHtml": "A" + } + }, + { + "data": "<!DOCTYPE html><body><command>A", + "errors": [ + "eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "command": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "command", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><command>A</command></body></html>", + "noQuirksBodyHtml": "<command>A</command>" + } + }, + { + "data": "<!DOCTYPE html><body><menuitem>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "menuitem": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "menuitem" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><menuitem>A</body></html>", + "noQuirksBodyHtml": "<menuitem>A" + } + }, + { + "data": "<!DOCTYPE html><body><embed>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "embed": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "embed" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><embed>A</body></html>", + "noQuirksBodyHtml": "<embed>A" + } + }, + { + "data": "<!DOCTYPE html><body><frame>A", + "errors": [ + "(1,28): unexpected-start-tag-ignored" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>A</body></html>", + "noQuirksBodyHtml": "A" + } + }, + { + "data": "<!DOCTYPE html><body><hr>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "hr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "hr" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><hr>A</body></html>", + "noQuirksBodyHtml": "<hr>A" + } + }, + { + "data": "<!DOCTYPE html><body><img>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "img": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "img" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><img>A</body></html>", + "noQuirksBodyHtml": "<img>A" + } + }, + { + "data": "<!DOCTYPE html><body><input>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><input>A</body></html>", + "noQuirksBodyHtml": "<input>A" + } + }, + { + "data": "<!DOCTYPE html><body><keygen>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "keygen": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "keygen" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><keygen>A</body></html>", + "noQuirksBodyHtml": "<keygen>A" + } + }, + { + "data": "<!DOCTYPE html><body><link>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "link": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "link" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><link>A</body></html>", + "noQuirksBodyHtml": "<link>A" + } + }, + { + "data": "<!DOCTYPE html><body><meta>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "meta": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "meta" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><meta>A</body></html>", + "noQuirksBodyHtml": "<meta>A" + } + }, + { + "data": "<!DOCTYPE html><body><param>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "param": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "param" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><param>A</body></html>", + "noQuirksBodyHtml": "<param>A" + } + }, + { + "data": "<!DOCTYPE html><body><source>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "source": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "source" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><source>A</body></html>", + "noQuirksBodyHtml": "<source>A" + } + }, + { + "data": "<!DOCTYPE html><body><track>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "track": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "track" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><track>A</body></html>", + "noQuirksBodyHtml": "<track>A" + } + }, + { + "data": "<!DOCTYPE html><body><wbr>A", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "wbr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "wbr" + }, + { + "text": "A" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><wbr>A</body></html>", + "noQuirksBodyHtml": "<wbr>A" + } + } + ], + "tests26.dat": [ + { + "data": "<!DOCTYPE html><body><a href='#1'><nobr>1<nobr></a><br><a href='#2'><nobr>2<nobr></a><br><a href='#3'><nobr>3<nobr></a>", + "errors": [ + "(1,47): unexpected-start-tag-implies-end-tag", + "(1,51): adoption-agency-1.3", + "(1,74): unexpected-start-tag-implies-end-tag", + "(1,74): adoption-agency-1.3", + "(1,81): unexpected-start-tag-implies-end-tag", + "(1,85): adoption-agency-1.3", + "(1,108): unexpected-start-tag-implies-end-tag", + "(1,108): adoption-agency-1.3", + "(1,115): unexpected-start-tag-implies-end-tag", + "(1,119): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "nobr": true, + "br": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "#1" + } + ], + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "br" + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "#2" + } + ] + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "#2" + } + ], + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "br" + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "#3" + } + ] + } + ] + }, + { + "tag": "a", + "attrs": [ + { + "name": "href", + "value": "#3" + } + ], + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + }, + { + "tag": "nobr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><a href=\"#1\"><nobr>1</nobr><nobr></nobr></a><nobr><br><a href=\"#2\"></a></nobr><a href=\"#2\"><nobr>2</nobr><nobr></nobr></a><nobr><br><a href=\"#3\"></a></nobr><a href=\"#3\"><nobr>3</nobr><nobr></nobr></a></body></html>", + "noQuirksBodyHtml": "<a href=\"#1\"><nobr>1</nobr><nobr></nobr></a><nobr><br><a href=\"#2\"></a></nobr><a href=\"#2\"><nobr>2</nobr><nobr></nobr></a><nobr><br><a href=\"#3\"></a></nobr><a href=\"#3\"><nobr>3</nobr><nobr></nobr></a>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3", + "errors": [ + "(1,37): unexpected-start-tag-implies-end-tag", + "(1,41): adoption-agency-1.3", + "(1,50): unexpected-start-tag-implies-end-tag", + "(1,50): adoption-agency-1.3", + "(1,57): unexpected-start-tag-implies-end-tag", + "(1,61): adoption-agency-1.3", + "(1,62): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1</nobr><nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></body></html>", + "noQuirksBodyHtml": "<b><nobr>1</nobr><nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3", + "errors": [ + "(1,44): foster-parenting-start-tag", + "(1,48): foster-parenting-end-tag", + "(1,48): adoption-agency-1.3", + "(1,51): foster-parenting-start-tag", + "(1,57): foster-parenting-start-tag", + "(1,57): nobr-already-in-scope", + "(1,57): adoption-agency-1.2", + "(1,58): foster-parenting-character", + "(1,64): foster-parenting-start-tag", + "(1,64): nobr-already-in-scope", + "(1,68): foster-parenting-end-tag", + "(1,68): adoption-agency-1.2", + "(1,69): foster-parenting-character", + "(1,69): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "i": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1<nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr><table></table></nobr></b></body></html>", + "noQuirksBodyHtml": "<b><nobr>1<nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr><table></table></nobr></b>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3", + "errors": [ + "(1,56): unexpected-end-tag", + "(1,65): unexpected-start-tag-implies-end-tag", + "(1,65): adoption-agency-1.3", + "(1,72): unexpected-start-tag-implies-end-tag", + "(1,76): adoption-agency-1.3", + "(1,77): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1<table><tbody><tr><td><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></td></tr></tbody></table></nobr></b></body></html>", + "noQuirksBodyHtml": "<b><nobr>1<table><tbody><tr><td><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></td></tr></tbody></table></nobr></b>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3", + "errors": [ + "(1,42): unexpected-start-tag-implies-end-tag", + "(1,42): adoption-agency-1.3", + "(1,46): adoption-agency-1.3", + "(1,46): adoption-agency-1.3", + "(1,55): unexpected-start-tag-implies-end-tag", + "(1,55): adoption-agency-1.3", + "(1,62): unexpected-start-tag-implies-end-tag", + "(1,66): adoption-agency-1.3", + "(1,67): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "div": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + } + ] + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr" + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1</nobr></b><div><b><nobr></nobr><nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></div></body></html>", + "noQuirksBodyHtml": "<b><nobr>1</nobr></b><div><b><nobr></nobr><nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></div>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3", + "errors": [ + "(1,37): unexpected-start-tag-implies-end-tag", + "(1,41): adoption-agency-1.3", + "(1,55): unexpected-start-tag-implies-end-tag", + "(1,55): adoption-agency-1.3", + "(1,62): unexpected-start-tag-implies-end-tag", + "(1,66): adoption-agency-1.3", + "(1,67): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "div": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "text": "3" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1</nobr><nobr></nobr></b><div><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></div></body></html>", + "noQuirksBodyHtml": "<b><nobr>1</nobr><nobr></nobr></b><div><nobr><i></i></nobr><i><nobr>2</nobr><nobr></nobr></i><nobr>3</nobr></div>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr>", + "errors": [ + "(1,37): unexpected-start-tag-implies-end-tag", + "(1,46): adoption-agency-1.3", + "(1,55): unexpected-start-tag-implies-end-tag", + "(1,55): adoption-agency-1.3", + "(1,55): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "ins": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "ins" + } + ] + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1</nobr><nobr><ins></ins></nobr></b><nobr><i></i></nobr><i><nobr></nobr></i></body></html>", + "noQuirksBodyHtml": "<b><nobr>1</nobr><nobr><ins></ins></nobr></b><nobr><i></i></nobr><i><nobr></nobr></i>" + } + }, + { + "data": "<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2", + "errors": [ + "(1,42): unexpected-start-tag-implies-end-tag", + "(1,42): adoption-agency-1.3", + "(1,46): adoption-agency-1.3", + "(1,50): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "ins": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "1" + }, + { + "tag": "ins" + } + ] + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "2" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b><nobr>1<ins></ins></nobr><nobr></nobr></b><nobr><i>2</i></nobr></body></html>", + "noQuirksBodyHtml": "<b><nobr>1<ins></ins></nobr><nobr></nobr></b><nobr><i>2</i></nobr>" + } + }, + { + "data": "<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i>", + "errors": [ + "(1,35): adoption-agency-1.3", + "(1,44): unexpected-start-tag-implies-end-tag", + "(1,44): adoption-agency-1.3", + "(1,49): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "1" + }, + { + "tag": "nobr" + } + ] + }, + { + "tag": "nobr", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "2" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><b>1<nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr></i></body></html>", + "noQuirksBodyHtml": "<b>1<nobr></nobr></b><nobr><i></i></nobr><i><nobr>2</nobr></i>" + } + }, + { + "data": "<p><code x</code></p>\n", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,11): invalid-character-in-attribute-name", + "(1,12): unexpected-character-after-solidus-in-tag", + "(1,21): unexpected-end-tag", + "(2,0): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "code": true + }, + "attrWithFunnyChar": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "code", + "attrs": [ + { + "name": "code", + "value": "" + }, + { + "name": "x<", + "value": "" + } + ] + } + ] + }, + { + "tag": "code", + "attrs": [ + { + "name": "code", + "value": "" + }, + { + "name": "x<", + "value": "" + } + ], + "children": [ + { + "text": "\n" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><code x<=\"\" code=\"\"></code></p><code x<=\"\" code=\"\">\n</code></body></html>", + "noQuirksBodyHtml": "<p><code x<=\"\" code=\"\"></code></p><code x<=\"\" code=\"\">\n</code>" + } + }, + { + "data": "<!DOCTYPE html><svg><foreignObject><p><i></p>a", + "errors": [ + "(1,45): unexpected-end-tag", + "(1,46): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true, + "p": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><svg><foreignObject><p><i></i></p><i>a</i></foreignObject></svg></body></html>", + "noQuirksBodyHtml": "<svg><foreignObject><p><i></i></p><i>a</i></foreignObject></svg>" + } + }, + { + "data": "<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a", + "errors": [ + "(1,60): unexpected-end-tag", + "(1,61): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg foreignObject": true, + "p": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><svg><foreignObject><p><i></i></p><i>a</i></foreignObject></svg></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><foreignObject><p><i></i></p><i>a</i></foreignObject></svg></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><math><mtext><p><i></p>a", + "errors": [ + "(1,38): unexpected-end-tag", + "(1,39): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mtext": true, + "p": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mtext><p><i></i></p><i>a</i></mtext></math></body></html>", + "noQuirksBodyHtml": "<math><mtext><p><i></i></p><i>a</i></mtext></math>" + } + }, + { + "data": "<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a", + "errors": [ + "(1,53): unexpected-end-tag", + "(1,54): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "math math": true, + "math mtext": true, + "p": true, + "i": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mtext", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "i" + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><math><mtext><p><i></i></p><i>a</i></mtext></math></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><math><mtext><p><i></i></p><i>a</i></mtext></math></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><div><!/div>a", + "errors": [ + "(1,28): expected-dashes-or-doctype", + "(1,34): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + }, + "doctype": true, + "comment": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "comment": "/div" + }, + { + "text": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><div><!--/div-->a</div></body></html>", + "noQuirksBodyHtml": "<div><!--/div-->a</div>" + } + }, + { + "data": "<button><p><button>", + "errors": [ + "Line 1 Col 8 Unexpected start tag (button). Expected DOCTYPE.", + "Line 1 Col 19 Unexpected start tag (button) implies end tag (button).", + "Line 1 Col 19 Expected closing tag. Unexpected end of file." + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "button": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "button", + "children": [ + { + "tag": "p" + } + ] + }, + { + "tag": "button" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><button><p></p></button><button></button></body></html>", + "noQuirksBodyHtml": "<button><p></p></button><button></button>" + } + } + ], + "tests3.dat": [ + { + "data": "<head></head><style></style>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,20): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><style></style></head><body></body></html>", + "noQuirksBodyHtml": "<style></style>" + } + }, + { + "data": "<head></head><script></script>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,21): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><script></script></head><body></body></html>", + "noQuirksBodyHtml": "<script></script>" + } + }, + { + "data": "<head></head><!-- --><style></style><!-- --><script></script>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,28): unexpected-start-tag-out-of-my-head", + "(1,52): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "script": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style" + }, + { + "tag": "script" + } + ] + }, + { + "comment": " " + }, + { + "comment": " " + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><style></style><script></script></head><!-- --><!-- --><body></body></html>", + "noQuirksBodyHtml": "<!-- --><style></style><!-- --><script></script>" + } + }, + { + "data": "<head></head><!-- -->x<style></style><!-- --><script></script>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "style": true, + "script": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "comment": " " + }, + { + "tag": "body", + "children": [ + { + "text": "x" + }, + { + "tag": "style" + }, + { + "comment": " " + }, + { + "tag": "script" + } + ] + } + ] + } + ], + "html": "<html><head></head><!-- --><body>x<style></style><!-- --><script></script></body></html>", + "noQuirksBodyHtml": "<!-- -->x<style></style><!-- --><script></script>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>\n</pre></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre></pre></body></html>", + "noQuirksBodyHtml": "<pre></pre>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>\nfoo</pre></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>foo</pre></body></html>", + "noQuirksBodyHtml": "<pre>foo</pre>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>\n\nfoo</pre></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true, + "extraNL": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "\nfoo", + "extraNL": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>\n\nfoo</pre></body></html>", + "noQuirksBodyHtml": "<pre>\n\nfoo</pre>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>\nfoo\n</pre></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "foo\n" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>foo\n</pre></body></html>", + "noQuirksBodyHtml": "<pre>foo\n</pre>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>x</pre><span>\n</span></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true, + "span": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "x" + } + ] + }, + { + "tag": "span", + "children": [ + { + "text": "\n" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>x</pre><span>\n</span></body></html>", + "noQuirksBodyHtml": "<pre>x</pre><span>\n</span>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>x\ny</pre></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "x\ny" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>x\ny</pre></body></html>", + "noQuirksBodyHtml": "<pre>x\ny</pre>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><pre>x<div>\ny</pre></body></html>", + "errors": [ + "(2,7): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true, + "div": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "x" + }, + { + "tag": "div", + "children": [ + { + "text": "\ny" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>x<div>\ny</div></pre></body></html>", + "noQuirksBodyHtml": "<pre>x<div>\ny</div></pre>" + } + }, + { + "data": "<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "pre": true + }, + "doctype": true, + "extraNL": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "pre", + "children": [ + { + "text": "\nA", + "extraNL": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><pre>\n\nA</pre></body></html>", + "noQuirksBodyHtml": "<pre>\n\nA</pre>" + } + }, + { + "data": "<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>", + "errors": [ + "(1,33): two-heads-are-not-better-than-one" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "meta": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "meta" + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><meta></head><body></body></html>", + "noQuirksBodyHtml": "<meta>" + } + }, + { + "data": "<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>", + "errors": [ + "(1,33): two-heads-are-not-better-than-one" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<textarea>foo<span>bar</span><i>baz", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,35): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "foo<span>bar</span><i>baz", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea>foo&lt;span&gt;bar&lt;/span&gt;&lt;i&gt;baz</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>foo&lt;span&gt;bar&lt;/span&gt;&lt;i&gt;baz</textarea>" + } + }, + { + "data": "<title>foo<span>bar</em><i>baz", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,30): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "foo<span>bar</em><i>baz", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>foo&lt;span&gt;bar&lt;/em&gt;&lt;i&gt;baz</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>foo&lt;span&gt;bar&lt;/em&gt;&lt;i&gt;baz</title>" + } + }, + { + "data": "<!DOCTYPE html><textarea>\n</textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea></textarea></body></html>", + "noQuirksBodyHtml": "<textarea></textarea>" + } + }, + { + "data": "<!DOCTYPE html><textarea>\nfoo</textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>foo</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>foo</textarea>" + } + }, + { + "data": "<!DOCTYPE html><textarea>\n\nfoo</textarea>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "doctype": true, + "extraNL": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": "\nfoo", + "extraNL": true + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><textarea>\n\nfoo</textarea></body></html>", + "noQuirksBodyHtml": "<textarea>\n\nfoo</textarea>" + } + }, + { + "data": "<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>", + "errors": [ + "(1,60): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ul": true, + "li": true, + "div": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "p" + } + ] + } + ] + }, + { + "tag": "li" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><ul><li><div><p></p></div></li><li></li></ul></body></html>", + "noQuirksBodyHtml": "<ul><li><div><p></p></div></li><li></li></ul>" + } + }, + { + "data": "<!doctype html><nobr><nobr><nobr>", + "errors": [ + "(1,27): unexpected-start-tag-implies-end-tag", + "(1,33): unexpected-start-tag-implies-end-tag", + "(1,33): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "nobr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "nobr" + }, + { + "tag": "nobr" + }, + { + "tag": "nobr" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><nobr></nobr><nobr></nobr><nobr></nobr></body></html>", + "noQuirksBodyHtml": "<nobr></nobr><nobr></nobr><nobr></nobr>" + } + }, + { + "data": "<!doctype html><nobr><nobr></nobr><nobr>", + "errors": [ + "(1,27): unexpected-start-tag-implies-end-tag", + "(1,40): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "nobr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "nobr" + }, + { + "tag": "nobr" + }, + { + "tag": "nobr" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><nobr></nobr><nobr></nobr><nobr></nobr></body></html>", + "noQuirksBodyHtml": "<nobr></nobr><nobr></nobr><nobr></nobr>" + } + }, + { + "data": "<!doctype html><html><body><p><table></table></body></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p></p><table></table></body></html>", + "noQuirksBodyHtml": "<p></p><table></table>" + } + }, + { + "data": "<p><table></table>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><table></table></p></body></html>", + "noQuirksBodyHtml": "<p></p><table></table>" + } + } + ], + "tests4.dat": [ + { + "data": "direct div content", + "errors": [], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "direct div content" + } + ], + "html": "direct div content", + "noQuirksBodyHtml": "direct div content" + } + }, + { + "data": "direct textarea content", + "errors": [], + "fragment": { + "name": "textarea" + }, + "document": { + "props": { + "tags": {} + }, + "tree": [ + { + "text": "direct textarea content" + } + ], + "html": "direct textarea content", + "noQuirksBodyHtml": "direct textarea content" + } + }, + { + "data": "textarea content with <em>pseudo</em> <foo>markup", + "errors": [], + "fragment": { + "name": "textarea" + }, + "document": { + "props": { + "tags": {}, + "escaped": true + }, + "tree": [ + { + "text": "textarea content with <em>pseudo</em> <foo>markup", + "escaped": true + } + ], + "html": "textarea content with &lt;em&gt;pseudo&lt;/em&gt; &lt;foo&gt;markup", + "noQuirksBodyHtml": "textarea content with <em>pseudo</em> <foo>markup</foo>" + } + }, + { + "data": "this is &#x0043;DATA inside a <style> element", + "errors": [], + "fragment": { + "name": "style" + }, + "document": { + "props": { + "tags": {}, + "no_escape": true + }, + "tree": [ + { + "text": "this is &#x0043;DATA inside a <style> element", + "no_escape": true + } + ], + "html": "this is &#x0043;DATA inside a <style> element", + "noQuirksBodyHtml": "this is CDATA inside a <style> element</style>" + } + }, + { + "data": "</plaintext>", + "errors": [], + "fragment": { + "name": "plaintext" + }, + "document": { + "props": { + "tags": {}, + "no_escape": true + }, + "tree": [ + { + "text": "</plaintext>", + "no_escape": true + } + ], + "html": "</plaintext>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "setting html's innerHTML", + "errors": [], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "setting html's innerHTML" + } + ] + } + ], + "html": "<head></head><body>setting html's innerHTML</body>", + "noQuirksBodyHtml": "setting html's innerHTML" + } + }, + { + "data": "<title>setting head's innerHTML</title>", + "errors": [], + "fragment": { + "name": "head" + }, + "document": { + "props": { + "tags": { + "title": true + } + }, + "tree": [ + { + "tag": "title", + "children": [ + { + "text": "setting head's innerHTML" + } + ] + } + ], + "html": "<title>setting head's innerHTML</title>", + "noQuirksBodyHtml": "<title>setting head's innerHTML</title>" + } + } + ], + "tests5.dat": [ + { + "data": "<style> <!-- </style>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <!-- ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "x" + } + ] + } + ] + } + ], + "html": "<html><head><style> <!-- </style></head><body>x</body></html>", + "noQuirksBodyHtml": "<style> <!-- </style>x" + } + }, + { + "data": "<style> <!-- </style> --> </style>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,34): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <!-- ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "--> x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><style> <!-- </style> </head><body>--&gt; x</body></html>", + "noQuirksBodyHtml": "<style> <!-- </style> --&gt; x" + } + }, + { + "data": "<style> <!--> </style>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <!--> ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "x" + } + ] + } + ] + } + ], + "html": "<html><head><style> <!--> </style></head><body>x</body></html>", + "noQuirksBodyHtml": "<style> <!--> </style>x" + } + }, + { + "data": "<style> <!---> </style>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <!---> ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "x" + } + ] + } + ] + } + ], + "html": "<html><head><style> <!---> </style></head><body>x</body></html>", + "noQuirksBodyHtml": "<style> <!---> </style>x" + } + }, + { + "data": "<iframe> <!---> </iframe>x", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": " <!---> ", + "no_escape": true + } + ] + }, + { + "text": "x" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><iframe> <!---> </iframe>x</body></html>", + "noQuirksBodyHtml": "<iframe> <!---> </iframe>x" + } + }, + { + "data": "<iframe> <!--- </iframe>->x</iframe> --> </iframe>x", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,36): unexpected-end-tag", + "(1,50): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "iframe": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "iframe", + "children": [ + { + "text": " <!--- ", + "no_escape": true + } + ] + }, + { + "text": "->x --> x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><iframe> <!--- </iframe>-&gt;x --&gt; x</body></html>", + "noQuirksBodyHtml": "<iframe> <!--- </iframe>-&gt;x --&gt; x" + } + }, + { + "data": "<script> <!-- </script> --> </script>x", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,37): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "script": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "script", + "children": [ + { + "text": " <!-- ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "--> x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><script> <!-- </script> </head><body>--&gt; x</body></html>", + "noQuirksBodyHtml": "<script> <!-- </script> --&gt; x" + } + }, + { + "data": "<title> <!-- </title> --> </title>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,34): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": " <!-- ", + "escaped": true + } + ] + }, + { + "text": " " + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "--> x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><title> &lt;!-- </title> </head><body>--&gt; x</body></html>", + "noQuirksBodyHtml": "<title> &lt;!-- </title> --&gt; x" + } + }, + { + "data": "<textarea> <!--- </textarea>->x</textarea> --> </textarea>x", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,42): unexpected-end-tag", + "(1,58): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "textarea": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "textarea", + "children": [ + { + "text": " <!--- ", + "escaped": true + } + ] + }, + { + "text": "->x --> x", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body><textarea> &lt;!--- </textarea>-&gt;x --&gt; x</body></html>", + "noQuirksBodyHtml": "<textarea> &lt;!--- </textarea>-&gt;x --&gt; x" + } + }, + { + "data": "<style> <!</-- </style>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <!</-- ", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "x" + } + ] + } + ] + } + ], + "html": "<html><head><style> <!</-- </style></head><body>x</body></html>", + "noQuirksBodyHtml": "<style> <!</-- </style>x" + } + }, + { + "data": "<p><xmp></xmp>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "xmp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p" + }, + { + "tag": "xmp" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p></p><xmp></xmp></body></html>", + "noQuirksBodyHtml": "<p></p><xmp></xmp>" + } + }, + { + "data": "<xmp> <!-- > --> </xmp>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "xmp": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "xmp", + "children": [ + { + "text": " <!-- > --> ", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><xmp> <!-- > --> </xmp></body></html>", + "noQuirksBodyHtml": "<xmp> <!-- > --> </xmp>" + } + }, + { + "data": "<title>&amp;</title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "&", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>&amp;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&amp;</title>" + } + }, + { + "data": "<title><!--&amp;--></title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<!--&-->", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>&lt;!--&amp;--&gt;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;!--&amp;--&gt;</title>" + } + }, + { + "data": "<title><!--</title>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<!--", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><title>&lt;!--</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;!--</title>" + } + }, + { + "data": "<noscript><!--</noscript>--></noscript>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,39): unexpected-end-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "no_escape": true, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<!--", + "no_escape": true + } + ] + } + ] + }, + { + "tag": "body", + "children": [ + { + "text": "-->", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head><noscript><!--</noscript></head><body>--&gt;</body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>--&gt;" + } + }, + { + "data": "<noscript><!--</noscript>--></noscript>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "noscript": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "noscript", + "children": [ + { + "comment": "</noscript>" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head><noscript><!--</noscript>--></noscript></head><body></body></html>", + "noQuirksBodyHtml": "<noscript>&lt;!--</noscript>--&gt;" + } + } + ], + "tests6.dat": [ + { + "data": "<!doctype html></head> <head>", + "errors": [ + "(1,29): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "text": " " + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head> <body></body></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!doctype html><form><div></form><div>", + "errors": [ + "(1,33): end-tag-too-early-ignored", + "(1,38): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true, + "div": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><form><div><div></div></div></form></body></html>", + "noQuirksBodyHtml": "<form><div><div></div></div></form>" + } + }, + { + "data": "<!doctype html><title>&amp;</title>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "&", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>&amp;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&amp;</title>" + } + }, + { + "data": "<!doctype html><title><!--&amp;--></title>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true, + "escaped": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "<!--&-->", + "escaped": true + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>&lt;!--&amp;--&gt;</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>&lt;!--&amp;--&gt;</title>" + } + }, + { + "data": "<!doctype>", + "errors": [ + "(1,9): need-space-after-doctype", + "(1,10): expected-doctype-name-but-got-right-bracket", + "(1,10): unknown-doctype" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE ><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!---x", + "errors": [ + "(1,6): eof-in-comment", + "(1,6): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": "-x" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!---x--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!---x-->" + } + }, + { + "data": "<body>\n<div>", + "errors": [ + "(1,6): unexpected-start-tag", + "(2,5): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "text": "\n" + }, + { + "tag": "div" + } + ], + "html": "\n<div></div>", + "noQuirksBodyHtml": "\n<div></div>" + } + }, + { + "data": "<frameset></frameset>\nfoo", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(2,1): unexpected-char-after-frameset", + "(2,2): unexpected-char-after-frameset", + "(2,3): unexpected-char-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": "\n" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset>\n</html>", + "noQuirksBodyHtml": "\nfoo" + } + }, + { + "data": "<frameset></frameset>\n<noframes>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(2,10): expected-named-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": "\n" + }, + { + "tag": "noframes" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset>\n<noframes></noframes></html>", + "noQuirksBodyHtml": "\n<noframes></noframes>" + } + }, + { + "data": "<frameset></frameset>\n<div>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(2,5): unexpected-start-tag-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": "\n" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset>\n</html>", + "noQuirksBodyHtml": "\n<div></div>" + } + }, + { + "data": "<frameset></frameset>\n</html>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": "\n" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset>\n</html>", + "noQuirksBodyHtml": "\n" + } + }, + { + "data": "<frameset></frameset>\n</div>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(2,6): unexpected-end-tag-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": "\n" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset>\n</html>", + "noQuirksBodyHtml": "\n" + } + }, + { + "data": "<form><form>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,12): unexpected-start-tag", + "(1,12): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "form": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "form" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><form></form></body></html>", + "noQuirksBodyHtml": "<form></form>" + } + }, + { + "data": "<button><button>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,16): unexpected-start-tag-implies-end-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "button": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "button" + }, + { + "tag": "button" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><button></button><button></button></body></html>", + "noQuirksBodyHtml": "<button></button><button></button>" + } + }, + { + "data": "<table><tr><td></th>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,20): unexpected-end-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><caption><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,20): unexpected-cell-in-table-body", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption></caption><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><caption></caption><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><caption><div>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption><div></div></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><div></div></caption></table>" + } + }, + { + "data": "</caption><div>", + "errors": [ + "(1,10): XXX-undefined-error", + "(1,15): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "<div></div>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<table><caption><div></caption>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,31): expected-one-end-tag-but-got-another", + "(1,31): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption><div></div></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><div></div></caption></table>" + } + }, + { + "data": "<table><caption></table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption></caption></table>" + } + }, + { + "data": "</table><div>", + "errors": [ + "(1,8): unexpected-end-tag", + "(1,13): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "<div></div>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,23): unexpected-end-tag", + "(1,29): unexpected-end-tag", + "(1,40): unexpected-end-tag", + "(1,47): unexpected-end-tag", + "(1,55): unexpected-end-tag", + "(1,60): unexpected-end-tag", + "(1,68): unexpected-end-tag", + "(1,73): unexpected-end-tag", + "(1,81): unexpected-end-tag", + "(1,86): unexpected-end-tag", + "(1,86): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption></caption></table>" + } + }, + { + "data": "<table><caption><div></div>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><caption><div></div></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><div></div></caption></table>" + } + }, + { + "data": "<table><tr><td></body></caption></col></colgroup></html>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,22): unexpected-end-tag", + "(1,32): unexpected-end-tag", + "(1,38): unexpected-end-tag", + "(1,49): unexpected-end-tag", + "(1,56): unexpected-end-tag", + "(1,56): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "</table></tbody></tfoot></thead></tr><div>", + "errors": [ + "(1,8): unexpected-end-tag", + "(1,16): unexpected-end-tag", + "(1,24): unexpected-end-tag", + "(1,32): unexpected-end-tag", + "(1,37): unexpected-end-tag", + "(1,42): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "<div></div>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<table><colgroup>foo", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,18): foster-parenting-character-in-table", + "(1,19): foster-parenting-character-in-table", + "(1,20): foster-parenting-character-in-table", + "(1,20): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "foo" + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>foo<table><colgroup></colgroup></table></body></html>", + "noQuirksBodyHtml": "foo<table><colgroup></colgroup></table>" + } + }, + { + "data": "foo<col>", + "errors": [ + "(1,1): unexpected-character-in-colgroup", + "(1,2): unexpected-character-in-colgroup", + "(1,3): unexpected-character-in-colgroup" + ], + "fragment": { + "name": "colgroup" + }, + "document": { + "props": { + "tags": { + "col": true + } + }, + "tree": [ + { + "tag": "col" + } + ], + "html": "<col>", + "noQuirksBodyHtml": "foo" + } + }, + { + "data": "<table><colgroup></col>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,23): no-end-tag", + "(1,23): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "colgroup": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><colgroup></colgroup></table></body></html>", + "noQuirksBodyHtml": "<table><colgroup></colgroup></table>" + } + }, + { + "data": "<frameset><div>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,15): unexpected-start-tag-in-frameset", + "(1,15): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "</frameset><frame>", + "errors": [ + "(1,11): unexpected-frameset-in-frameset-innerhtml" + ], + "fragment": { + "name": "frameset" + }, + "document": { + "props": { + "tags": { + "frame": true + } + }, + "tree": [ + { + "tag": "frame" + } + ], + "html": "<frame>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<frameset></div>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag", + "(1,16): unexpected-end-tag-in-frameset", + "(1,16): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</body><div>", + "errors": [ + "(1,7): unexpected-close-tag", + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "body" + }, + "document": { + "props": { + "tags": { + "div": true + } + }, + "tree": [ + { + "tag": "div" + } + ], + "html": "<div></div>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<table><tr><div>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,16): unexpected-start-tag-implies-table-voodoo", + "(1,16): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<div></div><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "</tr><td>", + "errors": [ + "(1,5): unexpected-end-tag" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</tbody></tfoot></thead><td>", + "errors": [ + "(1,8): unexpected-end-tag", + "(1,16): unexpected-end-tag", + "(1,24): unexpected-end-tag" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<table><tr><div><td>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,16): foster-parenting-start-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div><table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<div></div><table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<caption><col><colgroup><tbody><tfoot><thead><tr>", + "errors": [ + "(1,9): unexpected-start-tag", + "(1,14): unexpected-start-tag", + "(1,24): unexpected-start-tag", + "(1,31): unexpected-start-tag", + "(1,38): unexpected-start-tag", + "(1,45): unexpected-start-tag" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "tr": true + } + }, + "tree": [ + { + "tag": "tr" + } + ], + "html": "<tr></tr>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<table><tbody></thead>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,22): unexpected-end-tag-in-table-body", + "(1,22): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody></tbody></table>" + } + }, + { + "data": "</table><tr>", + "errors": [ + "(1,8): unexpected-end-tag" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "tr": true + } + }, + "tree": [ + { + "tag": "tr" + } + ], + "html": "<tr></tr>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<table><tbody></body></caption></col></colgroup></html></td></th></tr>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,21): unexpected-end-tag-in-table-body", + "(1,31): unexpected-end-tag-in-table-body", + "(1,37): unexpected-end-tag-in-table-body", + "(1,48): unexpected-end-tag-in-table-body", + "(1,55): unexpected-end-tag-in-table-body", + "(1,60): unexpected-end-tag-in-table-body", + "(1,65): unexpected-end-tag-in-table-body", + "(1,70): unexpected-end-tag-in-table-body", + "(1,70): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody></tbody></table>" + } + }, + { + "data": "<table><tbody></div>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,20): unexpected-end-tag-implies-table-voodoo", + "(1,20): end-tag-too-early", + "(1,20): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody></tbody></table>" + } + }, + { + "data": "<table><table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,14): unexpected-start-tag-implies-end-tag", + "(1,14): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table></table><table></table></body></html>", + "noQuirksBodyHtml": "<table></table><table></table>" + } + }, + { + "data": "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,14): unexpected-end-tag", + "(1,24): unexpected-end-tag", + "(1,30): unexpected-end-tag", + "(1,41): unexpected-end-tag", + "(1,48): unexpected-end-tag", + "(1,56): unexpected-end-tag", + "(1,61): unexpected-end-tag", + "(1,69): unexpected-end-tag", + "(1,74): unexpected-end-tag", + "(1,82): unexpected-end-tag", + "(1,87): unexpected-end-tag", + "(1,87): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table></table></body></html>", + "noQuirksBodyHtml": "<table></table>" + } + }, + { + "data": "</table><tr>", + "errors": [ + "(1,8): unexpected-end-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<tbody><tr></tr></tbody>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body></body></html>", + "errors": [ + "(1,20): unexpected-end-tag-after-body-innerhtml" + ], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ], + "html": "<head></head><body></body>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<html><frameset></frameset></html> ", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + }, + { + "text": " " + } + ] + } + ], + "html": "<html><head></head><frameset></frameset> </html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"><html></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html \"-//W3C//DTD HTML 4.01//EN\" \"\"" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<param><frameset></frameset>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,17): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<param>" + } + }, + { + "data": "<source><frameset></frameset>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,18): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<source>" + } + }, + { + "data": "<track><frameset></frameset>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,17): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<track>" + } + }, + { + "data": "</html><frameset></frameset>", + "errors": [ + "(1,7): expected-doctype-but-got-end-tag", + "(1,17): expected-eof-but-got-start-tag", + "(1,17): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</body><frameset></frameset>", + "errors": [ + "(1,7): expected-doctype-but-got-end-tag", + "(1,17): unexpected-start-tag-after-body", + "(1,17): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "" + } + } + ], + "tests7.dat": [ + { + "data": "<!doctype html><body><title>X</title>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "title": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><title>X</title></body></html>", + "noQuirksBodyHtml": "<title>X</title>" + } + }, + { + "data": "<!doctype html><table><title>X</title></table>", + "errors": [ + "(1,29): unexpected-start-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "title": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><title>X</title><table></table></body></html>", + "noQuirksBodyHtml": "<title>X</title><table></table>" + } + }, + { + "data": "<!doctype html><head></head><title>X</title>", + "errors": [ + "(1,35): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>X</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>X</title>" + } + }, + { + "data": "<!doctype html></head><title>X</title>", + "errors": [ + "(1,29): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "title": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "title", + "children": [ + { + "text": "X" + } + ] + } + ] + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head><title>X</title></head><body></body></html>", + "noQuirksBodyHtml": "<title>X</title>" + } + }, + { + "data": "<!doctype html><table><meta></table>", + "errors": [ + "(1,28): unexpected-start-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "meta": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "meta" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><meta><table></table></body></html>", + "noQuirksBodyHtml": "<meta><table></table>" + } + }, + { + "data": "<!doctype html><table>X<tr><td><table> <meta></table></table>", + "errors": [ + "unexpected text in table", + "(1,45): unexpected-start-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "meta": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "meta" + }, + { + "tag": "table", + "children": [ + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X<table><tbody><tr><td><meta><table> </table></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "X<table><tbody><tr><td><meta><table> </table></td></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><html> <head>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!doctype html> <head>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": " " + } + }, + { + "data": "<!doctype html><table><style> <tr>x </style> </table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "style": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "style", + "children": [ + { + "text": " <tr>x ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><style> <tr>x </style> </table></body></html>", + "noQuirksBodyHtml": "<table><style> <tr>x </style> </table>" + } + }, + { + "data": "<!doctype html><table><TBODY><script> <tr>x </script> </table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "script": true + }, + "doctype": true, + "no_escape": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "script", + "children": [ + { + "text": " <tr>x ", + "no_escape": true + } + ] + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><script> <tr>x </script> </tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><script> <tr>x </script> </tbody></table>" + } + }, + { + "data": "<!doctype html><p><applet><p>X</p></applet>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "applet": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "applet", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><applet><p>X</p></applet></p></body></html>", + "noQuirksBodyHtml": "<p><applet><p>X</p></applet></p>" + } + }, + { + "data": "<!doctype html><p><object type=\"application/x-non-existant-plugin\"><p>X</p></object>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "object": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "object", + "attrs": [ + { + "name": "type", + "value": "application/x-non-existant-plugin" + } + ], + "children": [ + { + "tag": "p", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><p><object type=\"application/x-non-existant-plugin\"><p>X</p></object></p></body></html>", + "noQuirksBodyHtml": "<p><object type=\"application/x-non-existant-plugin\"><p>X</p></object></p>" + } + }, + { + "data": "<!doctype html><listing>\nX</listing>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "listing": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "listing", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><listing>X</listing></body></html>", + "noQuirksBodyHtml": "<listing>X</listing>" + } + }, + { + "data": "<!doctype html><select><input>X", + "errors": [ + "(1,30): unexpected-input-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "input" + }, + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select><input>X</body></html>", + "noQuirksBodyHtml": "<select></select><input>X" + } + }, + { + "data": "<!doctype html><select><select>X", + "errors": [ + "(1,31): unexpected-select-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "text": "X" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select>X</body></html>", + "noQuirksBodyHtml": "<select></select>X" + } + }, + { + "data": "<!doctype html><table><input type=hidDEN></table>", + "errors": [ + "(1,41): unexpected-hidden-input-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidDEN" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><input type=\"hidDEN\"></table></body></html>", + "noQuirksBodyHtml": "<table><input type=\"hidDEN\"></table>" + } + }, + { + "data": "<!doctype html><table>X<input type=hidDEN></table>", + "errors": [ + "(1,23): foster-parenting-character", + "(1,42): unexpected-hidden-input-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + }, + { + "tag": "table", + "children": [ + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidDEN" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body>X<table><input type=\"hidDEN\"></table></body></html>", + "noQuirksBodyHtml": "X<table><input type=\"hidDEN\"></table>" + } + }, + { + "data": "<!doctype html><table> <input type=hidDEN></table>", + "errors": [ + "(1,43): unexpected-hidden-input-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidDEN" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table> <input type=\"hidDEN\"></table></body></html>", + "noQuirksBodyHtml": "<table> <input type=\"hidDEN\"></table>" + } + }, + { + "data": "<!doctype html><table> <input type='hidDEN'></table>", + "errors": [ + "(1,45): unexpected-hidden-input-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidDEN" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table> <input type=\"hidDEN\"></table></body></html>", + "noQuirksBodyHtml": "<table> <input type=\"hidDEN\"></table>" + } + }, + { + "data": "<!doctype html><table><input type=\" hidden\"><input type=hidDEN></table>", + "errors": [ + "(1,44): unexpected-start-tag-implies-table-voodoo", + "(1,63): unexpected-hidden-input-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": " hidden" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "hidDEN" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><input type=\" hidden\"><table><input type=\"hidDEN\"></table></body></html>", + "noQuirksBodyHtml": "<input type=\" hidden\"><table><input type=\"hidDEN\"></table>" + } + }, + { + "data": "<!doctype html><table><select>X<tr>", + "errors": [ + "(1,30): unexpected-start-tag-implies-table-voodoo", + "(1,35): unexpected-table-element-start-tag-in-select-in-table", + "(1,35): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "X" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select>X</select><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<select>X</select><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!doctype html><select>X</select>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "X" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select>X</select></body></html>", + "noQuirksBodyHtml": "<select>X</select>" + } + }, + { + "data": "<!DOCTYPE hTmL><html></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<!DOCTYPE HTML><html></html>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body>X</body></body>", + "errors": [ + "(1,21): unexpected-end-tag-after-body" + ], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "X" + } + ] + } + ], + "html": "<head></head><body>X</body>", + "noQuirksBodyHtml": "X" + } + }, + { + "data": "<div><p>a</x> b", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,13): unexpected-end-tag", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "a b" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><p>a b</p></div></body></html>", + "noQuirksBodyHtml": "<div><p>a b</p></div>" + } + }, + { + "data": "<table><tr><td><code></code> </table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "code": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "code" + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><code></code> </td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><code></code> </td></tr></tbody></table>" + } + }, + { + "data": "<table><b><tr><td>aaa</td></tr>bbb</table>ccc", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,10): foster-parenting-start-tag", + "(1,32): foster-parenting-character", + "(1,33): foster-parenting-character", + "(1,34): foster-parenting-character", + "(1,45): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b" + }, + { + "tag": "b", + "children": [ + { + "text": "bbb" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "aaa" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "text": "ccc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b></b><b>bbb</b><table><tbody><tr><td>aaa</td></tr></tbody></table><b>ccc</b></body></html>", + "noQuirksBodyHtml": "<b></b><b>bbb</b><table><tbody><tr><td>aaa</td></tr></tbody></table><b>ccc</b>" + } + }, + { + "data": "A<table><tr> B</tr> B</table>", + "errors": [ + "(1,1): expected-doctype-but-got-chars", + "(1,13): foster-parenting-character", + "(1,14): foster-parenting-character", + "(1,20): foster-parenting-character", + "(1,21): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A B B" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>A B B<table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "A B B<table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "A<table><tr> B</tr> </em>C</table>", + "errors": [ + "(1,1): expected-doctype-but-got-chars", + "(1,13): foster-parenting-character", + "(1,14): foster-parenting-character", + "(1,20): foster-parenting-character", + "(1,25): unexpected-end-tag", + "(1,26): foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A BC" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>A BC<table><tbody><tr></tr> </tbody></table></body></html>", + "noQuirksBodyHtml": "A BC<table><tbody><tr></tr> </tbody></table>" + } + }, + { + "data": "<select><keygen>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,16): unexpected-input-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "keygen": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + }, + { + "tag": "keygen" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select></select><keygen></body></html>", + "noQuirksBodyHtml": "<select></select><keygen>" + } + } + ], + "tests8.dat": [ + { + "data": "<div>\n<div></div>\n</span>x", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(3,7): unexpected-end-tag", + "(3,8): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "\n" + }, + { + "tag": "div" + }, + { + "text": "\nx" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>\n<div></div>\nx</div></body></html>", + "noQuirksBodyHtml": "<div>\n<div></div>\nx</div>" + } + }, + { + "data": "<div>x<div></div>\n</span>x", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(2,7): unexpected-end-tag", + "(2,8): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "x" + }, + { + "tag": "div" + }, + { + "text": "\nx" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>x<div></div>\nx</div></body></html>", + "noQuirksBodyHtml": "<div>x<div></div>\nx</div>" + } + }, + { + "data": "<div>x<div></div>x</span>x", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,25): unexpected-end-tag", + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "x" + }, + { + "tag": "div" + }, + { + "text": "xx" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>x<div></div>xx</div></body></html>", + "noQuirksBodyHtml": "<div>x<div></div>xx</div>" + } + }, + { + "data": "<div>x<div></div>y</span>z", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,25): unexpected-end-tag", + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "x" + }, + { + "tag": "div" + }, + { + "text": "yz" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>x<div></div>yz</div></body></html>", + "noQuirksBodyHtml": "<div>x<div></div>yz</div>" + } + }, + { + "data": "<table><div>x<div></div>x</span>x", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,12): foster-parenting-start-tag", + "(1,13): foster-parenting-character", + "(1,18): foster-parenting-start-tag", + "(1,24): foster-parenting-end-tag", + "(1,25): foster-parenting-start-tag", + "(1,32): foster-parenting-end-tag", + "(1,32): unexpected-end-tag", + "(1,33): foster-parenting-character", + "(1,33): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "x" + }, + { + "tag": "div" + }, + { + "text": "xx" + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>x<div></div>xx</div><table></table></body></html>", + "noQuirksBodyHtml": "<div>x<div></div>xx</div><table></table>" + } + }, + { + "data": "x<table>x", + "errors": [ + "(1,1): expected-doctype-but-got-chars", + "(1,9): foster-parenting-character", + "(1,9): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "xx" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>xx<table></table></body></html>", + "noQuirksBodyHtml": "xx<table></table>" + } + }, + { + "data": "x<table><table>x", + "errors": [ + "(1,1): expected-doctype-but-got-chars", + "(1,15): unexpected-start-tag-implies-end-tag", + "(1,16): foster-parenting-character", + "(1,16): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "x" + }, + { + "tag": "table" + }, + { + "text": "x" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>x<table></table>x<table></table></body></html>", + "noQuirksBodyHtml": "x<table></table>x<table></table>" + } + }, + { + "data": "<b>a<div></div><div></b>y", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,24): adoption-agency-1.3", + "(1,25): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "a" + }, + { + "tag": "div" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b" + }, + { + "text": "y" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b>a<div></div></b><div><b></b>y</div></body></html>", + "noQuirksBodyHtml": "<b>a<div></div></b><div><b></b>y</div>" + } + }, + { + "data": "<a><div><p></a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,15): adoption-agency-1.3", + "(1,15): adoption-agency-1.3", + "(1,15): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "div": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "children": [ + { + "tag": "a" + }, + { + "tag": "p", + "children": [ + { + "tag": "a" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a></a><div><a></a><p><a></a></p></div></body></html>", + "noQuirksBodyHtml": "<a></a><div><a></a><p><a></a></p></div>" + } + } + ], + "tests9.dat": [ + { + "data": "<!DOCTYPE html><math></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math></math></body></html>", + "noQuirksBodyHtml": "<math></math>" + } + }, + { + "data": "<!DOCTYPE html><body><math></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math></math></body></html>", + "noQuirksBodyHtml": "<math></math>" + } + }, + { + "data": "<!DOCTYPE html><math><mi>", + "errors": [ + "(1,25) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi></mi></math>" + } + }, + { + "data": "<!DOCTYPE html><math><annotation-xml><svg><u>", + "errors": [ + "(1,45) unexpected-html-element-in-foreign-content", + "(1,45) expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math annotation-xml": true, + "svg svg": true, + "u": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "annotation-xml", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "u" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><annotation-xml><svg></svg></annotation-xml></math><u></u></body></html>", + "noQuirksBodyHtml": "<math><annotation-xml><svg><u></u></svg></annotation-xml></math>" + } + }, + { + "data": "<!DOCTYPE html><body><select><math></math></select>", + "errors": [ + "(1,35) unexpected-start-tag-in-select", + "(1,42) unexpected-end-tag-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select></select></body></html>", + "noQuirksBodyHtml": "<select></select>" + } + }, + { + "data": "<!DOCTYPE html><body><select><option><math></math></option></select>", + "errors": [ + "(1,43) unexpected-start-tag-in-select", + "(1,50) unexpected-end-tag-in-select" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select><option></option></select></body></html>", + "noQuirksBodyHtml": "<select><option></option></select>" + } + }, + { + "data": "<!DOCTYPE html><body><table><math></math></table>", + "errors": [ + "(1,34) unexpected-start-tag-implies-table-voodoo" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math></math><table></table></body></html>", + "noQuirksBodyHtml": "<math></math><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>", + "errors": [ + "(1,34) foster-parenting-start-token", + "(1,39) foster-parenting-character", + "(1,40) foster-parenting-character", + "(1,41) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi></math><table></table></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi></math><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>", + "errors": [ + "(1,34) foster-parenting-start-tag", + "(1,39) foster-parenting-character", + "(1,40) foster-parenting-character", + "(1,41) foster-parenting-character", + "(1,51) foster-parenting-character", + "(1,52) foster-parenting-character", + "(1,53) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "table": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><table></table></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi></math><table></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>", + "errors": [ + "(1,41) foster-parenting-start-tag", + "(1,46) foster-parenting-character", + "(1,47) foster-parenting-character", + "(1,48) foster-parenting-character", + "(1,58) foster-parenting-character", + "(1,59) foster-parenting-character", + "(1,60) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "table": true, + "tbody": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><table><tbody></tbody></table></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi></math><table><tbody></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>", + "errors": [ + "(1,45) foster-parenting-start-tag", + "(1,50) foster-parenting-character", + "(1,51) foster-parenting-character", + "(1,52) foster-parenting-character", + "(1,62) foster-parenting-character", + "(1,63) foster-parenting-character", + "(1,64) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "table": true, + "tbody": true, + "tr": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi></math><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></td></tr></tbody></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></caption></table></body></html>", + "noQuirksBodyHtml": "<table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></caption></table>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux", + "errors": [ + "(1,70) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></caption></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</p></math></caption></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux", + "errors": [ + "(1,78) unexpected-end-tag", + "(1,78) expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "caption": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "caption", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + }, + { + "text": "baz" + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</math></caption></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><caption><math><mi>foo</mi><mi>bar</mi>baz</math></caption></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux", + "errors": [ + "(1,44) foster-parenting-start-tag", + "(1,49) foster-parenting-character", + "(1,50) foster-parenting-character", + "(1,51) foster-parenting-character", + "(1,61) foster-parenting-character", + "(1,62) foster-parenting-character", + "(1,63) foster-parenting-character", + "(1,71) unexpected-html-element-in-foreign-content", + "(1,71) foster-parenting-start-tag", + "(1,63) foster-parenting-character", + "(1,63) foster-parenting-character", + "(1,63) foster-parenting-character" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "p": true, + "table": true, + "colgroup": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup" + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><p>baz</p><table><colgroup></colgroup></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi><p>baz</p></math><table><colgroup></colgroup></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux", + "errors": [ + "(1,50) unexpected-start-tag-in-select", + "(1,54) unexpected-start-tag-in-select", + "(1,62) unexpected-end-tag-in-select", + "(1,66) unexpected-start-tag-in-select", + "(1,74) unexpected-end-tag-in-select", + "(1,77) unexpected-start-tag-in-select", + "(1,88) unexpected-table-element-end-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "select": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "foobarbaz" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><table><tbody><tr><td><select>foobarbaz</select></td></tr></tbody></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><select>foobarbaz</select></td></tr></tbody></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux", + "errors": [ + "(1,36) unexpected-start-tag-implies-table-voodoo", + "(1,42) unexpected-start-tag-in-select", + "(1,46) unexpected-start-tag-in-select", + "(1,54) unexpected-end-tag-in-select", + "(1,58) unexpected-start-tag-in-select", + "(1,66) unexpected-end-tag-in-select", + "(1,69) unexpected-start-tag-in-select", + "(1,80) unexpected-table-element-end-tag-in-select-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "table": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "text": "foobarbaz" + } + ] + }, + { + "tag": "table" + }, + { + "tag": "p", + "children": [ + { + "text": "quux" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><select>foobarbaz</select><table></table><p>quux</p></body></html>", + "noQuirksBodyHtml": "<select>foobarbaz</select><table></table><p>quux</p>" + } + }, + { + "data": "<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz", + "errors": [ + "(1,41) expected-eof-but-got-start-tag", + "(1,68) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi><p>baz</p></math>" + } + }, + { + "data": "<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz", + "errors": [ + "(1,34) unexpected-start-tag-after-body", + "(1,61) unexpected-html-element-in-foreign-content" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true, + "p": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "bar" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "text": "baz" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><math><mi>foo</mi><mi>bar</mi></math><p>baz</p></body></html>", + "noQuirksBodyHtml": "<math><mi>foo</mi><mi>bar</mi><p>baz</p></math>" + } + }, + { + "data": "<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>", + "errors": [ + "(1,31) unexpected-start-tag-in-frameset", + "(1,35) unexpected-start-tag-in-frameset", + "(1,40) unexpected-end-tag-in-frameset", + "(1,44) unexpected-start-tag-in-frameset", + "(1,49) unexpected-end-tag-in-frameset", + "(1,52) unexpected-start-tag-in-frameset", + "(1,58) unexpected-start-tag-in-frameset", + "(1,58) eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<math><mi></mi><mi></mi><p><span></span></p></math>" + } + }, + { + "data": "<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>", + "errors": [ + "(1,42) unexpected-start-tag-after-frameset", + "(1,46) unexpected-start-tag-after-frameset", + "(1,51) unexpected-end-tag-after-frameset", + "(1,55) unexpected-start-tag-after-frameset", + "(1,60) unexpected-end-tag-after-frameset", + "(1,63) unexpected-start-tag-after-frameset", + "(1,69) unexpected-start-tag-after-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<math><mi></mi><mi></mi><p><span></span></p></math>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + } + ], + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\"><math xlink:href=\"foo\"></math></body></html>", + "noQuirksBodyHtml": "<math xlink:href=\"foo\"></math>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi></math>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi></math></body></html>", + "noQuirksBodyHtml": "<math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi></math>" + } + }, + { + "data": "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mi": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "xlink:href", + "value": "foo" + }, + { + "name": "xml:lang", + "value": "en" + } + ], + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "attrs": [ + { + "name": "href", + "ns": "http://www.w3.org/1999/xlink", + "value": "foo" + }, + { + "name": "lang", + "ns": "http://www.w3.org/XML/1998/namespace", + "value": "en" + } + ] + }, + { + "text": "bar" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body xlink:href=\"foo\" xml:lang=\"en\"><math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi>bar</math></body></html>", + "noQuirksBodyHtml": "<math><mi xml:lang=\"en\" xlink:href=\"foo\"></mi>bar</math>" + } + } + ], + "tests_innerHTML_1.dat": [ + { + "data": "<body><span>", + "errors": [ + "(1,6): unexpected-start-tag", + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "body" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span><body>", + "errors": [ + "(1,12): unexpected-start-tag", + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "body" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span><body>", + "errors": [ + "(1,12): unexpected-start-tag", + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<body><span>", + "errors": [ + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true, + "span": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<head></head><body><span></span></body>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<frameset><span>", + "errors": [ + "(1,10): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "body" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span><frameset>", + "errors": [ + "(1,16): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "body" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span><frameset>", + "errors": [ + "(1,16): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<frameset><span>", + "errors": [ + "(1,16): unexpected-start-tag-in-frameset", + "(1,16): eof-in-frameset" + ], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "frameset": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ], + "html": "<head></head><frameset></frameset>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<table><tr>", + "errors": [ + "(1,7): unexpected-start-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<tbody><tr></tr></tbody>", + "noQuirksBodyHtml": "<table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "</table><tr>", + "errors": [ + "(1,8): unexpected-end-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<tbody><tr></tr></tbody>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<a>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,3): eof-in-table" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,3): eof-in-table" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><caption>a", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,13): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "caption": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "caption", + "children": [ + { + "text": "a" + } + ] + } + ], + "html": "<a></a><caption>a</caption>", + "noQuirksBodyHtml": "<a>a</a>" + } + }, + { + "data": "<a><colgroup><col>", + "errors": [ + "(1,3): foster-parenting-start-token", + "(1,18): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "colgroup": true, + "col": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + } + ], + "html": "<a></a><colgroup><col></colgroup>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><tbody><tr>", + "errors": [ + "(1,3): foster-parenting-start-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<a></a><tbody><tr></tr></tbody>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><tfoot><tr>", + "errors": [ + "(1,3): foster-parenting-start-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "tfoot": true, + "tr": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tfoot", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<a></a><tfoot><tr></tr></tfoot>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><thead><tr>", + "errors": [ + "(1,3): foster-parenting-start-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "thead": true, + "tr": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "thead", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<a></a><thead><tr></tr></thead>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><tr>", + "errors": [ + "(1,3): foster-parenting-start-tag" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ], + "html": "<a></a><tbody><tr></tr></tbody>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><th>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,7): unexpected-cell-in-table-body" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "tbody": true, + "tr": true, + "th": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "th" + } + ] + } + ] + } + ], + "html": "<a></a><tbody><tr><th></th></tr></tbody>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><td>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,7): unexpected-cell-in-table-body" + ], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "a": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ], + "html": "<a></a><tbody><tr><td></td></tr></tbody>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<table></table><tbody>", + "errors": [ + "(1,22): unexpected-start-tag" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "table": true + } + }, + "tree": [ + { + "tag": "table" + } + ], + "html": "<table></table>", + "noQuirksBodyHtml": "<table></table>" + } + }, + { + "data": "</table><span>", + "errors": [ + "(1,8): unexpected-end-tag", + "(1,14): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span></table>", + "errors": [ + "(1,14): unexpected-end-tag", + "(1,14): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "</caption><span>", + "errors": [ + "(1,10): XXX-undefined-error", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span" + } + ], + "html": "<span></span>", + "noQuirksBodyHtml": "<span></span>" + } + }, + { + "data": "<span></caption><span>", + "errors": [ + "(1,16): XXX-undefined-error", + "(1,22): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><caption><span>", + "errors": [ + "(1,15): unexpected-start-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><col><span>", + "errors": [ + "(1,11): unexpected-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><colgroup><span>", + "errors": [ + "(1,16): unexpected-start-tag", + "(1,22): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><html><span>", + "errors": [ + "(1,12): non-html-root", + "(1,18): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><tbody><span>", + "errors": [ + "(1,13): unexpected-start-tag", + "(1,19): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><td><span>", + "errors": [ + "(1,10): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><tfoot><span>", + "errors": [ + "(1,13): unexpected-start-tag", + "(1,19): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><thead><span>", + "errors": [ + "(1,13): unexpected-start-tag", + "(1,19): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><th><span>", + "errors": [ + "(1,10): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span><tr><span>", + "errors": [ + "(1,10): unexpected-start-tag", + "(1,16): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "<span></table><span>", + "errors": [ + "(1,14): unexpected-end-tag", + "(1,20): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "caption" + }, + "document": { + "props": { + "tags": { + "span": true + } + }, + "tree": [ + { + "tag": "span", + "children": [ + { + "tag": "span" + } + ] + } + ], + "html": "<span><span></span></span>", + "noQuirksBodyHtml": "<span><span></span></span>" + } + }, + { + "data": "</colgroup><col>", + "errors": [ + "(1,11): XXX-undefined-error" + ], + "fragment": { + "name": "colgroup" + }, + "document": { + "props": { + "tags": { + "col": true + } + }, + "tree": [ + { + "tag": "col" + } + ], + "html": "<col>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<a><col>", + "errors": [ + "(1,3): XXX-undefined-error" + ], + "fragment": { + "name": "colgroup" + }, + "document": { + "props": { + "tags": { + "col": true + } + }, + "tree": [ + { + "tag": "col" + } + ], + "html": "<col>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<caption><a>", + "errors": [ + "(1,9): XXX-undefined-error", + "(1,12): unexpected-start-tag-implies-table-voodoo", + "(1,12): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<col><a>", + "errors": [ + "(1,5): XXX-undefined-error", + "(1,8): unexpected-start-tag-implies-table-voodoo", + "(1,8): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<colgroup><a>", + "errors": [ + "(1,10): XXX-undefined-error", + "(1,13): unexpected-start-tag-implies-table-voodoo", + "(1,13): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<tbody><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): unexpected-start-tag-implies-table-voodoo", + "(1,10): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<tfoot><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): unexpected-start-tag-implies-table-voodoo", + "(1,10): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<thead><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): unexpected-start-tag-implies-table-voodoo", + "(1,10): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</table><a>", + "errors": [ + "(1,8): XXX-undefined-error", + "(1,11): unexpected-start-tag-implies-table-voodoo", + "(1,11): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><tr>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true, + "tr": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tr" + } + ], + "html": "<a></a><tr></tr>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><td>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,7): unexpected-cell-in-table-body" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ], + "html": "<a></a><tr><td></td></tr>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><td>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,7): unexpected-cell-in-table-body" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ], + "html": "<a></a><tr><td></td></tr>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<a><td>", + "errors": [ + "(1,3): unexpected-start-tag-implies-table-voodoo", + "(1,7): unexpected-cell-in-table-body" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "a": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "a" + }, + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ], + "html": "<a></a><tr><td></td></tr>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<td><table><tbody><a><tr>", + "errors": [ + "(1,4): unexpected-cell-in-table-body", + "(1,21): unexpected-start-tag-implies-table-voodoo", + "(1,25): eof-in-table" + ], + "fragment": { + "name": "tbody" + }, + "document": { + "props": { + "tags": { + "tr": true, + "td": true, + "a": true, + "table": true, + "tbody": true + } + }, + "tree": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "a" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<tr><td><a></a><table><tbody><tr></tr></tbody></table></td></tr>", + "noQuirksBodyHtml": "<a></a><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "</tr><td>", + "errors": [ + "(1,5): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<td><table><a><tr></tr><tr>", + "errors": [ + "(1,14): unexpected-start-tag-implies-table-voodoo", + "(1,27): eof-in-table" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true, + "a": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "td", + "children": [ + { + "tag": "a" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + }, + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ], + "html": "<td><a></a><table><tbody><tr></tr><tr></tr></tbody></table></td>", + "noQuirksBodyHtml": "<a></a><table><tbody><tr></tr><tr></tr></tbody></table>" + } + }, + { + "data": "<caption><td>", + "errors": [ + "(1,9): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<col><td>", + "errors": [ + "(1,5): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<colgroup><td>", + "errors": [ + "(1,10): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<tbody><td>", + "errors": [ + "(1,7): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<tfoot><td>", + "errors": [ + "(1,7): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<thead><td>", + "errors": [ + "(1,7): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<tr><td>", + "errors": [ + "(1,4): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "</table><td>", + "errors": [ + "(1,8): XXX-undefined-error" + ], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true + } + }, + "tree": [ + { + "tag": "td" + } + ], + "html": "<td></td>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<td><table></table><td>", + "errors": [], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true, + "table": true + } + }, + "tree": [ + { + "tag": "td", + "children": [ + { + "tag": "table" + } + ] + }, + { + "tag": "td" + } + ], + "html": "<td><table></table></td><td></td>", + "noQuirksBodyHtml": "<table></table>" + } + }, + { + "data": "<td><table></table><td>", + "errors": [], + "fragment": { + "name": "tr" + }, + "document": { + "props": { + "tags": { + "td": true, + "table": true + } + }, + "tree": [ + { + "tag": "td", + "children": [ + { + "tag": "table" + } + ] + }, + { + "tag": "td" + } + ], + "html": "<td><table></table></td><td></td>", + "noQuirksBodyHtml": "<table></table>" + } + }, + { + "data": "<caption><a>", + "errors": [ + "(1,9): XXX-undefined-error", + "(1,12): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<col><a>", + "errors": [ + "(1,5): XXX-undefined-error", + "(1,8): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<colgroup><a>", + "errors": [ + "(1,10): XXX-undefined-error", + "(1,13): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<tbody><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<tfoot><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<th><a>", + "errors": [ + "(1,4): XXX-undefined-error", + "(1,7): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<thead><a>", + "errors": [ + "(1,7): XXX-undefined-error", + "(1,10): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<tr><a>", + "errors": [ + "(1,4): XXX-undefined-error", + "(1,7): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</table><a>", + "errors": [ + "(1,8): XXX-undefined-error", + "(1,11): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</tbody><a>", + "errors": [ + "(1,8): XXX-undefined-error", + "(1,11): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</td><a>", + "errors": [ + "(1,5): unexpected-end-tag", + "(1,8): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</tfoot><a>", + "errors": [ + "(1,8): XXX-undefined-error", + "(1,11): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</thead><a>", + "errors": [ + "(1,8): XXX-undefined-error", + "(1,11): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</th><a>", + "errors": [ + "(1,5): unexpected-end-tag", + "(1,8): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "</tr><a>", + "errors": [ + "(1,5): XXX-undefined-error", + "(1,8): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "a": true + } + }, + "tree": [ + { + "tag": "a" + } + ], + "html": "<a></a>", + "noQuirksBodyHtml": "<a></a>" + } + }, + { + "data": "<table><td><td>", + "errors": [ + "(1,11): unexpected-cell-in-table-body", + "(1,15): expected-closing-tag-but-got-eof" + ], + "fragment": { + "name": "td" + }, + "document": { + "props": { + "tags": { + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + }, + { + "tag": "td" + } + ] + } + ] + } + ] + } + ], + "html": "<table><tbody><tr><td></td><td></td></tr></tbody></table>", + "noQuirksBodyHtml": "<table><tbody><tr><td></td><td></td></tr></tbody></table>" + } + }, + { + "data": "</select><option>", + "errors": [ + "(1,9): XXX-undefined-error", + "(1,17): eof-in-select" + ], + "fragment": { + "name": "select" + }, + "document": { + "props": { + "tags": { + "option": true + } + }, + "tree": [ + { + "tag": "option" + } + ], + "html": "<option></option>", + "noQuirksBodyHtml": "<option></option>" + } + }, + { + "data": "<input><option>", + "errors": [ + "(1,7): unexpected-input-in-select", + "(1,15): eof-in-select" + ], + "fragment": { + "name": "select" + }, + "document": { + "props": { + "tags": { + "option": true + } + }, + "tree": [ + { + "tag": "option" + } + ], + "html": "<option></option>", + "noQuirksBodyHtml": "<input><option></option>" + } + }, + { + "data": "<keygen><option>", + "errors": [ + "(1,8): unexpected-input-in-select", + "(1,16): eof-in-select" + ], + "fragment": { + "name": "select" + }, + "document": { + "props": { + "tags": { + "option": true + } + }, + "tree": [ + { + "tag": "option" + } + ], + "html": "<option></option>", + "noQuirksBodyHtml": "<keygen><option></option>" + } + }, + { + "data": "<textarea><option>", + "errors": [ + "(1,10): unexpected-input-in-select", + "(1,18): eof-in-select" + ], + "fragment": { + "name": "select" + }, + "document": { + "props": { + "tags": { + "option": true + } + }, + "tree": [ + { + "tag": "option" + } + ], + "html": "<option></option>", + "noQuirksBodyHtml": "<textarea>&lt;option&gt;</textarea>" + } + }, + { + "data": "</html><!--abc-->", + "errors": [ + "(1,7): unexpected-end-tag-after-body-innerhtml" + ], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body" + }, + { + "comment": "abc" + } + ], + "html": "<head></head><body></body><!--abc-->", + "noQuirksBodyHtml": "<!--abc-->" + } + }, + { + "data": "</frameset><frame>", + "errors": [ + "(1,11): unexpected-frameset-in-frameset-innerhtml" + ], + "fragment": { + "name": "frameset" + }, + "document": { + "props": { + "tags": { + "frame": true + } + }, + "tree": [ + { + "tag": "frame" + } + ], + "html": "<frame>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "", + "errors": [], + "fragment": { + "name": "html" + }, + "document": { + "props": { + "tags": { + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ], + "html": "<head></head><body></body>", + "noQuirksBodyHtml": "" + } + } + ], + "tricky01.dat": [ + { + "data": "<b><p>Bold </b> Not bold</p>\nAlso not bold.", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,15): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b" + }, + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "Bold " + } + ] + }, + { + "text": " Not bold" + } + ] + }, + { + "text": "\nAlso not bold." + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b></b><p><b>Bold </b> Not bold</p>\nAlso not bold.</body></html>", + "noQuirksBodyHtml": "<b></b><p><b>Bold </b> Not bold</p>\nAlso not bold." + } + }, + { + "data": "<html>\n<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain\n<p>I should not be red. <font color=red>Red. <i>Italic and red.</p>\n<p>Italic and red. </i> Red.</font> I should not be red.</p>\n<b>Bold <i>Bold and italic</b> Only Italic </i> Plain", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(2,58): adoption-agency-1.3", + "(3,67): unexpected-end-tag", + "(4,23): adoption-agency-1.3", + "(4,35): adoption-agency-1.3", + "(5,30): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "i": true, + "p": true, + "b": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "tag": "i", + "children": [ + { + "text": "Italic and Red" + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "text": "Italic and Red " + } + ] + }, + { + "text": " Just italic." + } + ] + }, + { + "text": " Italic only." + } + ] + }, + { + "text": " Plain\n" + }, + { + "tag": "p", + "children": [ + { + "text": "I should not be red. " + }, + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "text": "Red. " + }, + { + "tag": "i", + "children": [ + { + "text": "Italic and red." + } + ] + } + ] + } + ] + }, + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "tag": "i", + "children": [ + { + "text": "\n" + } + ] + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "color", + "value": "red" + } + ], + "children": [ + { + "tag": "i", + "children": [ + { + "text": "Italic and red. " + } + ] + }, + { + "text": " Red." + } + ] + }, + { + "text": " I should not be red." + } + ] + }, + { + "text": "\n" + }, + { + "tag": "b", + "children": [ + { + "text": "Bold " + }, + { + "tag": "i", + "children": [ + { + "text": "Bold and italic" + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": " Only Italic " + } + ] + }, + { + "text": " Plain" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><font color=\"red\"><i>Italic and Red</i></font><i><p><font color=\"red\">Italic and Red </font> Just italic.</p> Italic only.</i> Plain\n<p>I should not be red. <font color=\"red\">Red. <i>Italic and red.</i></font></p><font color=\"red\"><i>\n</i></font><p><font color=\"red\"><i>Italic and red. </i> Red.</font> I should not be red.</p>\n<b>Bold <i>Bold and italic</i></b><i> Only Italic </i> Plain</body></html>", + "noQuirksBodyHtml": "\n<font color=\"red\"><i>Italic and Red</i></font><i><p><font color=\"red\">Italic and Red </font> Just italic.</p> Italic only.</i> Plain\n<p>I should not be red. <font color=\"red\">Red. <i>Italic and red.</i></font></p><font color=\"red\"><i>\n</i></font><p><font color=\"red\"><i>Italic and red. </i> Red.</font> I should not be red.</p>\n<b>Bold <i>Bold and italic</i></b><i> Only Italic </i> Plain" + } + }, + { + "data": "<html><body>\n<p><font size=\"7\">First paragraph.</p>\n<p>Second paragraph.</p></font>\n<b><p><i>Bold and Italic</b> Italic</p>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(2,38): unexpected-end-tag", + "(4,28): adoption-agency-1.3", + "(4,28): adoption-agency-1.3", + "(4,39): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "font": true, + "b": true, + "i": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "\n" + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "7" + } + ], + "children": [ + { + "text": "First paragraph." + } + ] + } + ] + }, + { + "tag": "font", + "attrs": [ + { + "name": "size", + "value": "7" + } + ], + "children": [ + { + "text": "\n" + }, + { + "tag": "p", + "children": [ + { + "text": "Second paragraph." + } + ] + } + ] + }, + { + "text": "\n" + }, + { + "tag": "b" + }, + { + "tag": "p", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "i", + "children": [ + { + "text": "Bold and Italic" + } + ] + } + ] + }, + { + "tag": "i", + "children": [ + { + "text": " Italic" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>\n<p><font size=\"7\">First paragraph.</font></p><font size=\"7\">\n<p>Second paragraph.</p></font>\n<b></b><p><b><i>Bold and Italic</i></b><i> Italic</i></p></body></html>", + "noQuirksBodyHtml": "\n<p><font size=\"7\">First paragraph.</font></p><font size=\"7\">\n<p>Second paragraph.</p></font>\n<b></b><p><b><i>Bold and Italic</i></b><i> Italic</i></p>" + } + }, + { + "data": "<html>\n<dl>\n<dt><b>Boo\n<dd>Goo?\n</dl>\n</html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(4,4): end-tag-too-early", + "(5,5): end-tag-too-early", + "(6,7): expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dl": true, + "dt": true, + "b": true, + "dd": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dl", + "children": [ + { + "text": "\n" + }, + { + "tag": "dt", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "Boo\n" + } + ] + } + ] + }, + { + "tag": "dd", + "children": [ + { + "tag": "b", + "children": [ + { + "text": "Goo?\n" + } + ] + } + ] + } + ] + }, + { + "tag": "b", + "children": [ + { + "text": "\n" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><dl>\n<dt><b>Boo\n</b></dt><dd><b>Goo?\n</b></dd></dl><b>\n</b></body></html>", + "noQuirksBodyHtml": "\n<dl>\n<dt><b>Boo\n</b></dt><dd><b>Goo?\n</b></dd></dl><b>\n</b>" + } + }, + { + "data": "<html><body>\n<label><a><div>Hello<div>World</div></a></label> \n</body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(2,40): adoption-agency-1.3", + "(2,48): unexpected-end-tag", + "(3,7): expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "label": true, + "a": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "\n" + }, + { + "tag": "label", + "children": [ + { + "tag": "a" + }, + { + "tag": "div", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "Hello" + }, + { + "tag": "div", + "children": [ + { + "text": "World" + } + ] + } + ] + }, + { + "text": " \n" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>\n<label><a></a><div><a>Hello<div>World</div></a> \n</div></label></body></html>", + "noQuirksBodyHtml": "\n<label><a></a><div><a>Hello<div>World</div></a> \n</div></label>" + } + }, + { + "data": "<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,15): foster-parenting-start-tag", + "(1,16): foster-parenting-character", + "(1,22): foster-parenting-start-tag", + "(1,23): foster-parenting-character", + "(1,32): foster-parenting-end-tag", + "(1,32): end-tag-too-early", + "(1,33): foster-parenting-character", + "(1,38): foster-parenting-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "center": true, + "font": true, + "img": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "center", + "children": [ + { + "text": " " + }, + { + "tag": "font", + "children": [ + { + "text": "a" + } + ] + } + ] + }, + { + "tag": "font", + "children": [ + { + "tag": "img" + }, + { + "text": " " + } + ] + }, + { + "tag": "table", + "children": [ + { + "text": " " + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": " " + } + ] + }, + { + "text": " " + } + ] + }, + { + "text": " " + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><center> <font>a</font></center><font><img> </font><table> <tbody><tr><td> </td> </tr> </tbody></table></body></html>", + "noQuirksBodyHtml": "<center> <font>a</font></center><font><img> </font><table> <tbody><tr><td> </td> </tr> </tbody></table>" + } + }, + { + "data": "<table><tr><p><a><p>You should see this text.", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,14): unexpected-start-tag-implies-table-voodoo", + "(1,17): unexpected-start-tag-implies-table-voodoo", + "(1,20): unexpected-start-tag-implies-table-voodoo", + "(1,20): closing-non-current-p-element", + "(1,21): foster-parenting-character", + "(1,22): foster-parenting-character", + "(1,23): foster-parenting-character", + "(1,24): foster-parenting-character", + "(1,25): foster-parenting-character", + "(1,26): foster-parenting-character", + "(1,27): foster-parenting-character", + "(1,28): foster-parenting-character", + "(1,29): foster-parenting-character", + "(1,30): foster-parenting-character", + "(1,31): foster-parenting-character", + "(1,32): foster-parenting-character", + "(1,33): foster-parenting-character", + "(1,34): foster-parenting-character", + "(1,35): foster-parenting-character", + "(1,36): foster-parenting-character", + "(1,37): foster-parenting-character", + "(1,38): foster-parenting-character", + "(1,39): foster-parenting-character", + "(1,40): foster-parenting-character", + "(1,41): foster-parenting-character", + "(1,42): foster-parenting-character", + "(1,43): foster-parenting-character", + "(1,44): foster-parenting-character", + "(1,45): foster-parenting-character", + "(1,45): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "a": true, + "table": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "tag": "a" + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "You should see this text." + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p><a></a></p><p><a>You should see this text.</a></p><table><tbody><tr></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<p><a></a></p><p><a>You should see this text.</a></p><table><tbody><tr></tr></tbody></table>" + } + }, + { + "data": "<TABLE>\n<TR>\n<CENTER><CENTER><TD></TD></TR><TR>\n<FONT>\n<TABLE><tr></tr></TABLE>\n</P>\n<a></font><font></a>\nThis page contains an insanely badly-nested tag sequence.", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(3,8): unexpected-start-tag-implies-table-voodoo", + "(3,16): unexpected-start-tag-implies-table-voodoo", + "(4,6): unexpected-start-tag-implies-table-voodoo", + "(4,6): unexpected character token in table (the newline)", + "(5,7): unexpected-start-tag-implies-end-tag", + "(6,4): unexpected p end tag", + "(7,10): adoption-agency-1.3", + "(7,20): adoption-agency-1.3", + "(8,57): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "center": true, + "font": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "p": true, + "a": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "center", + "children": [ + { + "tag": "center" + } + ] + }, + { + "tag": "font", + "children": [ + { + "text": "\n" + } + ] + }, + { + "tag": "table", + "children": [ + { + "text": "\n" + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "text": "\n" + }, + { + "tag": "td" + } + ] + }, + { + "tag": "tr", + "children": [ + { + "text": "\n" + } + ] + } + ] + } + ] + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "font", + "children": [ + { + "text": "\n" + }, + { + "tag": "p" + }, + { + "text": "\n" + }, + { + "tag": "a" + } + ] + }, + { + "tag": "a", + "children": [ + { + "tag": "font" + } + ] + }, + { + "tag": "font", + "children": [ + { + "text": "\nThis page contains an insanely badly-nested tag sequence." + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><center><center></center></center><font>\n</font><table>\n<tbody><tr>\n<td></td></tr><tr>\n</tr></tbody></table><table><tbody><tr></tr></tbody></table><font>\n<p></p>\n<a></a></font><a><font></font></a><font>\nThis page contains an insanely badly-nested tag sequence.</font></body></html>", + "noQuirksBodyHtml": "<center><center></center></center><font>\n</font><table>\n<tbody><tr>\n<td></td></tr><tr>\n</tr></tbody></table><table><tbody><tr></tr></tbody></table><font>\n<p></p>\n<a></a></font><a><font></font></a><font>\nThis page contains an insanely badly-nested tag sequence.</font>" + } + }, + { + "data": "<html>\n<body>\n<b><nobr><div>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre>\n</body>\n</html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(3,56): adoption-agency-1.3", + "(4,58): adoption-agency-1.3", + "(5,7): expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "nobr": true, + "div": true, + "pre": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "\n" + }, + { + "tag": "b", + "children": [ + { + "tag": "nobr" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "This text is in a div inside a nobr" + } + ] + }, + { + "text": "More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. " + } + ] + }, + { + "tag": "pre", + "children": [ + { + "text": "A pre tag outside everything else." + } + ] + }, + { + "text": "\n\n" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>\n<b><nobr></nobr></b><div><b><nobr>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre>\n\n</div></body></html>", + "noQuirksBodyHtml": "\n\n<b><nobr></nobr></b><div><b><nobr>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre>\n\n</div>" + } + } + ], + "webkit01.dat": [ + { + "data": "Test", + "errors": [ + "(1,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "Test" + } + ] + } + ] + } + ], + "html": "<html><head></head><body>Test</body></html>", + "noQuirksBodyHtml": "Test" + } + }, + { + "data": "<div></div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div></div></body></html>", + "noQuirksBodyHtml": "<div></div>" + } + }, + { + "data": "<div>Test</div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "Test" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>Test</div></body></html>", + "noQuirksBodyHtml": "<div>Test</div>" + } + }, + { + "data": "<di", + "errors": [ + "(1,3): eof-in-tag-name", + "(1,3): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "Hello" + } + ] + }, + { + "text": "\n" + }, + { + "tag": "script", + "children": [ + { + "text": "\nconsole.log(\"PASS\");\n", + "no_escape": true + } + ] + }, + { + "text": "\n" + }, + { + "tag": "div", + "children": [ + { + "text": "Bye" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div></body></html>", + "noQuirksBodyHtml": "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>" + } + }, + { + "data": "<div foo=\"bar\">Hello</div>", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "foo", + "value": "bar" + } + ], + "children": [ + { + "text": "Hello" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div foo=\"bar\">Hello</div></body></html>", + "noQuirksBodyHtml": "<div foo=\"bar\">Hello</div>" + } + }, + { + "data": "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "script": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "Hello" + } + ] + }, + { + "text": "\n" + }, + { + "tag": "script", + "children": [ + { + "text": "\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n", + "no_escape": true + } + ] + }, + { + "text": "\n" + }, + { + "tag": "div", + "children": [ + { + "text": "Bye" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div></body></html>", + "noQuirksBodyHtml": "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>" + } + }, + { + "data": "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true, + "potato": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "attrs": [ + { + "name": "bar", + "value": "baz" + } + ] + }, + { + "tag": "potato", + "attrs": [ + { + "name": "quack", + "value": "duck" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo bar=\"baz\"></foo><potato quack=\"duck\"></potato></body></html>", + "noQuirksBodyHtml": "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>" + } + }, + { + "data": "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true, + "potato": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "attrs": [ + { + "name": "bar", + "value": "baz" + } + ], + "children": [ + { + "tag": "potato", + "attrs": [ + { + "name": "quack", + "value": "duck" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo bar=\"baz\"><potato quack=\"duck\"></potato></foo></body></html>", + "noQuirksBodyHtml": "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>" + } + }, + { + "data": "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,21): attributes-in-end-tag", + "(1,51): attributes-in-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true, + "potato": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo" + }, + { + "tag": "potato" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo></foo><potato></potato></body></html>", + "noQuirksBodyHtml": "<foo></foo><potato></potato>" + } + }, + { + "data": "</ tttt>", + "errors": [ + "(1,2): expected-closing-tag-but-got-char", + "(1,8): expected-doctype-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "comment": " tttt" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<!-- tttt--><html><head></head><body></body></html>", + "noQuirksBodyHtml": "<!-- tttt-->" + } + }, + { + "data": "<div FOO ><img><img></div>", + "errors": [ + "(1,10): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "img": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "foo", + "value": "" + } + ], + "children": [ + { + "tag": "img" + }, + { + "tag": "img" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div foo=\"\"><img><img></div></body></html>", + "noQuirksBodyHtml": "<div foo=\"\"><img><img></div>" + } + }, + { + "data": "<p>Test</p<p>Test2</p>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,13): unexpected-end-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "children": [ + { + "text": "TestTest2" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p>TestTest2</p></body></html>", + "noQuirksBodyHtml": "<p>TestTest2</p>" + } + }, + { + "data": "<rdar://problem/6869687>", + "errors": [ + "(1,7): unexpected-character-after-solidus-in-tag", + "(1,8): unexpected-character-after-solidus-in-tag", + "(1,16): unexpected-character-after-solidus-in-tag", + "(1,24): expected-doctype-but-got-start-tag", + "(1,24): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "rdar:": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "rdar:", + "attrs": [ + { + "name": "6869687", + "value": "" + }, + { + "name": "problem", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><rdar: problem=\"\" 6869687=\"\"></rdar:></body></html>", + "noQuirksBodyHtml": "<rdar: problem=\"\" 6869687=\"\"></rdar:>" + } + }, + { + "data": "<A>test< /A>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,8): expected-tag-name", + "(1,12): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a", + "children": [ + { + "text": "test< /A>", + "escaped": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a>test&lt; /A&gt;</a></body></html>", + "noQuirksBodyHtml": "<a>test&lt; /A&gt;</a>" + } + }, + { + "data": "&lt;", + "errors": [ + "(1,4): expected-doctype-but-got-chars" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "escaped": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "<", + "escaped": true + } + ] + } + ] + } + ], + "html": "<html><head></head><body>&lt;</body></html>", + "noQuirksBodyHtml": "&lt;" + } + }, + { + "data": "<body foo='bar'><body foo='baz' yo='mama'>", + "errors": [ + "(1,16): expected-doctype-but-got-start-tag", + "(1,42): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "attrs": [ + { + "name": "foo", + "value": "bar" + }, + { + "name": "yo", + "value": "mama" + } + ] + } + ] + } + ], + "html": "<html><head></head><body foo=\"bar\" yo=\"mama\"></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<body></br foo=\"bar\"></body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,21): attributes-in-end-tag", + "(1,21): unexpected-end-tag-treated-as" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><br></body></html>", + "noQuirksBodyHtml": "<br>" + } + }, + { + "data": "<bdy><br foo=\"bar\"></body>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,26): expected-one-end-tag-but-got-another" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "bdy": true, + "br": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "bdy", + "children": [ + { + "tag": "br", + "attrs": [ + { + "name": "foo", + "value": "bar" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><bdy><br foo=\"bar\"></bdy></body></html>", + "noQuirksBodyHtml": "<bdy><br foo=\"bar\"></bdy>" + } + }, + { + "data": "<body></body></br foo=\"bar\">", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,28): attributes-in-end-tag", + "(1,28): unexpected-end-tag-after-body", + "(1,28): unexpected-end-tag-treated-as" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "br": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "br" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><br></body></html>", + "noQuirksBodyHtml": "<br>" + } + }, + { + "data": "<bdy></body><br foo=\"bar\">", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,12): expected-one-end-tag-but-got-another", + "(1,26): unexpected-start-tag-after-body", + "(1,26): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "bdy": true, + "br": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "bdy", + "children": [ + { + "tag": "br", + "attrs": [ + { + "name": "foo", + "value": "bar" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><bdy><br foo=\"bar\"></bdy></body></html>", + "noQuirksBodyHtml": "<bdy><br foo=\"bar\"></bdy>" + } + }, + { + "data": "<html><body></body></html><!-- Hi there -->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + }, + { + "comment": " Hi there " + } + ], + "html": "<html><head></head><body></body></html><!-- Hi there -->", + "noQuirksBodyHtml": "<!-- Hi there -->" + } + }, + { + "data": "<html><body></body></html>x<!-- Hi there -->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): expected-eof-but-got-char" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "x" + }, + { + "comment": " Hi there " + } + ] + } + ] + } + ], + "html": "<html><head></head><body>x<!-- Hi there --></body></html>", + "noQuirksBodyHtml": "x<!-- Hi there -->" + } + }, + { + "data": "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): expected-eof-but-got-char" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "x" + }, + { + "comment": " Hi there " + } + ] + } + ] + }, + { + "comment": " Again " + } + ], + "html": "<html><head></head><body>x<!-- Hi there --></body></html><!-- Again -->", + "noQuirksBodyHtml": "x<!-- Hi there --><!-- Again -->" + } + }, + { + "data": "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): expected-eof-but-got-char" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + }, + "comment": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "x" + }, + { + "comment": " Hi there " + } + ] + } + ] + }, + { + "comment": " Again " + } + ], + "html": "<html><head></head><body>x<!-- Hi there --></body></html><!-- Again -->", + "noQuirksBodyHtml": "x<!-- Hi there --><!-- Again -->" + } + }, + { + "data": "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): XXX-undefined-error" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "rp": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "rp", + "children": [ + { + "text": "xx" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby><div><rp>xx</rp></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><rp>xx</rp></div></ruby>" + } + }, + { + "data": "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,27): XXX-undefined-error" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ruby": true, + "div": true, + "rt": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ruby", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "rt", + "children": [ + { + "text": "xx" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ruby><div><rt>xx</rt></div></ruby></body></html>", + "noQuirksBodyHtml": "<ruby><div><rt>xx</rt></div></ruby>" + } + }, + { + "data": "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true, + "noframes": true + }, + "comment": true, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset", + "children": [ + { + "comment": "1" + }, + { + "tag": "noframes", + "children": [ + { + "text": "A", + "no_escape": true + } + ] + }, + { + "comment": "2" + } + ] + }, + { + "comment": "3" + }, + { + "tag": "noframes", + "children": [ + { + "text": "B", + "no_escape": true + } + ] + }, + { + "comment": "4" + }, + { + "tag": "noframes", + "children": [ + { + "text": "C", + "no_escape": true + } + ] + } + ] + }, + { + "comment": "5" + }, + { + "comment": "6" + } + ], + "html": "<html><head></head><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--><noframes>C</noframes></html><!--5--><!--6-->", + "noQuirksBodyHtml": "<!--1--><noframes>A</noframes><!--2--><!--3--><noframes>B</noframes><!--4--><!--5--><noframes>C</noframes><!--6-->" + } + }, + { + "data": "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>", + "errors": [ + "(1,8): expected-doctype-but-got-start-tag", + "(1,25): unexpected-select-in-select", + "(1,59): unexpected-select-in-select", + "(1,93): unexpected-select-in-select", + "(1,127): unexpected-select-in-select", + "(1,127): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "select": true, + "option": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "A" + } + ] + } + ] + }, + { + "tag": "option", + "children": [ + { + "text": "B" + }, + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "C" + } + ] + } + ] + } + ] + }, + { + "tag": "option", + "children": [ + { + "text": "D" + }, + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "E" + } + ] + } + ] + } + ] + }, + { + "tag": "option", + "children": [ + { + "text": "F" + }, + { + "tag": "select", + "children": [ + { + "tag": "option", + "children": [ + { + "text": "G" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><select><option>A</option></select><option>B<select><option>C</option></select></option><option>D<select><option>E</option></select></option><option>F<select><option>G</option></select></option></body></html>", + "noQuirksBodyHtml": "<select><option>A</option></select><option>B<select><option>C</option></select></option><option>D<select><option>E</option></select></option><option>F<select><option>G</option></select></option>" + } + }, + { + "data": "<dd><dd><dt><dt><dd><li><li>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "dd": true, + "dt": true, + "li": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "dd" + }, + { + "tag": "dd" + }, + { + "tag": "dt" + }, + { + "tag": "dt" + }, + { + "tag": "dd", + "children": [ + { + "tag": "li" + }, + { + "tag": "li" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><dd></dd><dd></dd><dt></dt><dt></dt><dd><li></li><li></li></dd></body></html>", + "noQuirksBodyHtml": "<dd></dd><dd></dd><dt></dt><dt></dt><dd><li></li><li></li></dd>" + } + }, + { + "data": "<div><b></div><div><nobr>a<nobr>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,14): end-tag-too-early", + "(1,32): unexpected-start-tag-implies-end-tag", + "(1,32): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "b": true, + "nobr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "b" + } + ] + }, + { + "tag": "div", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "nobr", + "children": [ + { + "text": "a" + } + ] + }, + { + "tag": "nobr" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><b></b></div><div><b><nobr>a</nobr><nobr></nobr></b></div></body></html>", + "noQuirksBodyHtml": "<div><b></b></div><div><b><nobr>a</nobr><nobr></nobr></b></div>" + } + }, + { + "data": "<head></head>\n<body></body>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "text": "\n" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head>\n<body></body></html>", + "noQuirksBodyHtml": "\n" + } + }, + { + "data": "<head></head> <style></style>ddd", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,21): unexpected-start-tag-out-of-my-head" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "style": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head", + "children": [ + { + "tag": "style" + } + ] + }, + { + "text": " " + }, + { + "tag": "body", + "children": [ + { + "text": "ddd" + } + ] + } + ] + } + ], + "html": "<html><head><style></style></head> <body>ddd</body></html>", + "noQuirksBodyHtml": " <style></style>ddd" + } + }, + { + "data": "<kbd><table></kbd><col><select><tr>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,18): unexpected-end-tag-implies-table-voodoo", + "(1,18): unexpected-end-tag", + "(1,31): unexpected-start-tag-implies-table-voodoo", + "(1,35): unexpected-table-element-start-tag-in-select-in-table", + "(1,35): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "kbd": true, + "select": true, + "table": true, + "colgroup": true, + "col": true, + "tbody": true, + "tr": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "kbd", + "children": [ + { + "tag": "select" + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><kbd><select></select><table><colgroup><col></colgroup><tbody><tr></tr></tbody></table></kbd></body></html>", + "noQuirksBodyHtml": "<kbd><select></select><table><colgroup><col></colgroup><tbody><tr></tr></tbody></table></kbd>" + } + }, + { + "data": "<kbd><table></kbd><col><select><tr></table><div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,18): unexpected-end-tag-implies-table-voodoo", + "(1,18): unexpected-end-tag", + "(1,31): unexpected-start-tag-implies-table-voodoo", + "(1,35): unexpected-table-element-start-tag-in-select-in-table", + "(1,48): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "kbd": true, + "select": true, + "table": true, + "colgroup": true, + "col": true, + "tbody": true, + "tr": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "kbd", + "children": [ + { + "tag": "select" + }, + { + "tag": "table", + "children": [ + { + "tag": "colgroup", + "children": [ + { + "tag": "col" + } + ] + }, + { + "tag": "tbody", + "children": [ + { + "tag": "tr" + } + ] + } + ] + }, + { + "tag": "div" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><kbd><select></select><table><colgroup><col></colgroup><tbody><tr></tr></tbody></table><div></div></kbd></body></html>", + "noQuirksBodyHtml": "<kbd><select></select><table><colgroup><col></colgroup><tbody><tr></tr></tbody></table><div></div></kbd>" + } + }, + { + "data": "<a><li><style></style><title></title></a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,41): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "li": true, + "style": true, + "title": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a" + }, + { + "tag": "li", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "style" + }, + { + "tag": "title" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a></a><li><a><style></style><title></title></a></li></body></html>", + "noQuirksBodyHtml": "<a></a><li><a><style></style><title></title></a></li>" + } + }, + { + "data": "<font></p><p><meta><title></title></font>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,10): unexpected-end-tag", + "(1,41): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "font": true, + "p": true, + "meta": true, + "title": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "p" + } + ] + }, + { + "tag": "p", + "children": [ + { + "tag": "font", + "children": [ + { + "tag": "meta" + }, + { + "tag": "title" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><font><p></p></font><p><font><meta><title></title></font></p></body></html>", + "noQuirksBodyHtml": "<font><p></p></font><p><font><meta><title></title></font></p>" + } + }, + { + "data": "<a><center><title></title><a>", + "errors": [ + "(1,3): expected-doctype-but-got-start-tag", + "(1,29): unexpected-start-tag-implies-end-tag", + "(1,29): adoption-agency-1.3", + "(1,29): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "a": true, + "center": true, + "title": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "a" + }, + { + "tag": "center", + "children": [ + { + "tag": "a", + "children": [ + { + "tag": "title" + } + ] + }, + { + "tag": "a" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><a></a><center><a><title></title></a><a></a></center></body></html>", + "noQuirksBodyHtml": "<a></a><center><a><title></title></a><a></a></center>" + } + }, + { + "data": "<svg><title><div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg title": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><title><div></div></title></svg></body></html>", + "noQuirksBodyHtml": "<svg><title><div></div></title></svg>" + } + }, + { + "data": "<svg><title><rect><div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,23): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg title": true, + "rect": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "rect", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><title><rect><div></div></rect></title></svg></body></html>", + "noQuirksBodyHtml": "<svg><title><rect><div></div></rect></title></svg>" + } + }, + { + "data": "<svg><title><svg><div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,22): unexpected-html-element-in-foreign-content", + "(1,22): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg title": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><title><svg></svg><div></div></title></svg></body></html>", + "noQuirksBodyHtml": "<svg><title><svg><div></div></svg></title></svg>" + } + }, + { + "data": "<img <=\"\" FAIL>", + "errors": [ + "(1,6): invalid-character-in-attribute-name", + "(1,15): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "img": true + }, + "attrWithFunnyChar": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "img", + "attrs": [ + { + "name": "<", + "value": "" + }, + { + "name": "fail", + "value": "" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><img <=\"\" fail=\"\"></body></html>", + "noQuirksBodyHtml": "<img <=\"\" fail=\"\">" + } + }, + { + "data": "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>", + "errors": [ + "(1,4): expected-doctype-but-got-start-tag", + "(1,23): non-void-element-with-trailing-solidus", + "(1,29): end-tag-too-early" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "ul": true, + "li": true, + "div": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "ul", + "children": [ + { + "tag": "li", + "children": [ + { + "tag": "div", + "attrs": [ + { + "name": "id", + "value": "foo" + } + ], + "children": [ + { + "text": "A" + } + ] + } + ] + }, + { + "tag": "li", + "children": [ + { + "text": "B" + }, + { + "tag": "div", + "children": [ + { + "text": "C" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><ul><li><div id=\"foo\">A</div></li><li>B<div>C</div></li></ul></body></html>", + "noQuirksBodyHtml": "<ul><li><div id=\"foo\">A</div></li><li>B<div>C</div></li></ul>" + } + }, + { + "data": "<svg><em><desc></em>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,9): unexpected-html-element-in-foreign-content", + "(1,20): adoption-agency-1.3" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "em": true, + "desc": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "em", + "children": [ + { + "tag": "desc" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg></svg><em><desc></desc></em></body></html>", + "noQuirksBodyHtml": "<svg><em><desc></desc></em></svg>" + } + }, + { + "data": "<table><tr><td><svg><desc><td></desc><circle>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true, + "svg svg": true, + "svg desc": true, + "circle": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "desc", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + }, + { + "tag": "td", + "children": [ + { + "tag": "circle" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td><svg><desc></desc></svg></td><td><circle></circle></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td><svg><desc></desc></svg></td><td><circle></circle></td></tr></tbody></table>" + } + }, + { + "data": "<svg><tfoot></mi><td>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag", + "(1,17): unexpected-end-tag", + "(1,17): unexpected-end-tag", + "(1,21): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg tfoot": true, + "svg td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "tfoot", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "td", + "ns": "http://www.w3.org/2000/svg" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><tfoot><td></td></tfoot></svg></body></html>", + "noQuirksBodyHtml": "<svg><tfoot><td></td></tfoot></svg>" + } + }, + { + "data": "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "math math": true, + "math mrow": true, + "math mn": true, + "math mi": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "math", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mrow", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mrow", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "tag": "mn", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "1" + } + ] + } + ] + }, + { + "tag": "mi", + "ns": "http://www.w3.org/1998/Math/MathML", + "children": [ + { + "text": "a" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math></body></html>", + "noQuirksBodyHtml": "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>" + } + }, + { + "data": "<!doctype html><input type=\"hidden\"><frameset>", + "errors": [ + "(1,46): unexpected-start-tag", + "(1,46): eof-in-frameset" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "frameset": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "frameset" + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><frameset></frameset></html>", + "noQuirksBodyHtml": "<input type=\"hidden\">" + } + }, + { + "data": "<!doctype html><input type=\"button\"><frameset>", + "errors": [ + "(1,46): unexpected-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true + }, + "doctype": true + }, + "tree": [ + { + "doctype": "html" + }, + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input", + "attrs": [ + { + "name": "type", + "value": "button" + } + ] + } + ] + } + ] + } + ], + "html": "<!DOCTYPE html><html><head></head><body><input type=\"button\"></body></html>", + "noQuirksBodyHtml": "<input type=\"button\">" + } + } + ], + "webkit02.dat": [ + { + "data": "<foo bar=qux/>", + "errors": [ + "(1,14): expected-doctype-but-got-start-tag", + "(1,14): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "foo": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "foo", + "attrs": [ + { + "name": "bar", + "value": "qux/" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><foo bar=\"qux/\"></foo></body></html>", + "noQuirksBodyHtml": "<foo bar=\"qux/\"></foo>" + } + }, + { + "data": "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "script": "on", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "noscript": true, + "span": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "attrs": [ + { + "name": "id", + "value": "status" + } + ], + "children": [ + { + "tag": "noscript", + "children": [ + { + "text": "<strong>A</strong>", + "no_escape": true + } + ] + }, + { + "tag": "span", + "children": [ + { + "text": "B" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p></body></html>", + "noQuirksBodyHtml": "<p id=\"status\"><noscript>&lt;strong&gt;A&lt;/strong&gt;</noscript><span>B</span></p>" + } + }, + { + "data": "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>", + "errors": [ + "(1,15): expected-doctype-but-got-start-tag" + ], + "script": "off", + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "p": true, + "noscript": true, + "strong": true, + "span": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "p", + "attrs": [ + { + "name": "id", + "value": "status" + } + ], + "children": [ + { + "tag": "noscript", + "children": [ + { + "tag": "strong", + "children": [ + { + "text": "A" + } + ] + } + ] + }, + { + "tag": "span", + "children": [ + { + "text": "B" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p></body></html>", + "noQuirksBodyHtml": "<p id=\"status\"><noscript>&lt;strong&gt;A&lt;/strong&gt;</noscript><span>B</span></p>" + } + }, + { + "data": "<div><sarcasm><div></div></sarcasm></div>", + "errors": [ + "(1,5): expected-doctype-but-got-start-tag" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "div": true, + "sarcasm": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "div", + "children": [ + { + "tag": "sarcasm", + "children": [ + { + "tag": "div" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><div><sarcasm><div></div></sarcasm></div></body></html>", + "noQuirksBodyHtml": "<div><sarcasm><div></div></sarcasm></div>" + } + }, + { + "data": "<html><body><img src=\"\" border=\"0\" alt=\"><div>A</div></body></html>", + "errors": [ + "(1,6): expected-doctype-but-got-start-tag", + "(1,67): eof-in-attribute-value-double-quote" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body" + } + ] + } + ], + "html": "<html><head></head><body></body></html>", + "noQuirksBodyHtml": "" + } + }, + { + "data": "<table><td></tbody>A", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,20): foster-parenting-character", + "(1,20): eof-in-table" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "text": "A" + }, + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body>A<table><tbody><tr><td></td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "A<table><tbody><tr><td></td></tr></tbody></table>" + } + }, + { + "data": "<table><td></thead>A", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,19): XXX-undefined-error", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>A</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>A</td></tr></tbody></table>" + } + }, + { + "data": "<table><td></tfoot>A", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,11): unexpected-cell-in-table-body", + "(1,19): XXX-undefined-error", + "(1,20): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "tbody": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "tbody", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><tbody><tr><td>A</td></tr></tbody></table></body></html>", + "noQuirksBodyHtml": "<table><tbody><tr><td>A</td></tr></tbody></table>" + } + }, + { + "data": "<table><thead><td></tbody>A", + "errors": [ + "(1,7): expected-doctype-but-got-start-tag", + "(1,18): unexpected-cell-in-table-body", + "(1,26): XXX-undefined-error", + "(1,27): expected-closing-tag-but-got-eof" + ], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "table": true, + "thead": true, + "tr": true, + "td": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "table", + "children": [ + { + "tag": "thead", + "children": [ + { + "tag": "tr", + "children": [ + { + "tag": "td", + "children": [ + { + "text": "A" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><table><thead><tr><td>A</td></tr></thead></table></body></html>", + "noQuirksBodyHtml": "<table><thead><tr><td>A</td></tr></thead></table>" + } + }, + { + "data": "<legend>test</legend>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "legend": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "legend", + "children": [ + { + "text": "test" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><legend>test</legend></body></html>", + "noQuirksBodyHtml": "<legend>test</legend>" + } + }, + { + "data": "<table><input>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "input": true, + "table": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "input" + }, + { + "tag": "table" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><input><table></table></body></html>", + "noQuirksBodyHtml": "<input><table></table>" + } + }, + { + "data": "<b><em><foo><foo><aside></b>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "em": true, + "foo": true, + "aside": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo" + } + ] + } + ] + } + ] + }, + { + "tag": "em", + "children": [ + { + "tag": "aside", + "children": [ + { + "tag": "b" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><em><foo><foo></foo></foo></em></b><em><aside><b></b></aside></em></body></html>", + "noQuirksBodyHtml": "<b><em><foo><foo></foo></foo></em></b><em><aside><b></b></aside></em>" + } + }, + { + "data": "<b><em><foo><foo><aside></b></em>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "em": true, + "foo": true, + "aside": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo" + } + ] + } + ] + } + ] + }, + { + "tag": "em" + }, + { + "tag": "aside", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "b" + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><em><foo><foo></foo></foo></em></b><em></em><aside><em><b></b></em></aside></body></html>", + "noQuirksBodyHtml": "<b><em><foo><foo></foo></foo></em></b><em></em><aside><em><b></b></em></aside>" + } + }, + { + "data": "<b><em><foo><foo><foo><aside></b>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "em": true, + "foo": true, + "aside": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "aside", + "children": [ + { + "tag": "b" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><em><foo><foo><foo></foo></foo></foo></em></b><aside><b></b></aside></body></html>", + "noQuirksBodyHtml": "<b><em><foo><foo><foo></foo></foo></foo></em></b><aside><b></b></aside>" + } + }, + { + "data": "<b><em><foo><foo><foo><aside></b></em>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "b": true, + "em": true, + "foo": true, + "aside": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo" + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "aside", + "children": [ + { + "tag": "b" + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><b><em><foo><foo><foo></foo></foo></foo></em></b><aside><b></b></aside></body></html>", + "noQuirksBodyHtml": "<b><em><foo><foo><foo></foo></foo></foo></em></b><aside><b></b></aside>" + } + }, + { + "data": "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>", + "errors": [], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": { + "b": true, + "em": true, + "foo": true, + "aside": true + } + }, + "tree": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foo" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "aside", + "children": [ + { + "tag": "b" + } + ] + } + ], + "html": "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo></foo></foo></foo></foo></foo></foo></foo></foo></foo></foo></em></b><aside><b></b></aside>", + "noQuirksBodyHtml": "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo></foo></foo></foo></foo></foo></foo></foo></foo></foo></foo></em></b><aside><b></b></aside>" + } + }, + { + "data": "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>", + "errors": [], + "fragment": { + "name": "div" + }, + "document": { + "props": { + "tags": { + "b": true, + "em": true, + "foo": true, + "foob": true, + "fooc": true, + "food": true, + "aside": true + } + }, + "tree": [ + { + "tag": "b", + "children": [ + { + "tag": "em", + "children": [ + { + "tag": "foo", + "children": [ + { + "tag": "foob", + "children": [ + { + "tag": "foob", + "children": [ + { + "tag": "foob", + "children": [ + { + "tag": "foob", + "children": [ + { + "tag": "fooc", + "children": [ + { + "tag": "fooc", + "children": [ + { + "tag": "fooc", + "children": [ + { + "tag": "fooc", + "children": [ + { + "tag": "food" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "tag": "aside", + "children": [ + { + "tag": "b" + } + ] + } + ], + "html": "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food></food></fooc></fooc></fooc></fooc></foob></foob></foob></foob></foo></em></b><aside><b></b></aside>", + "noQuirksBodyHtml": "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food></food></fooc></fooc></fooc></fooc></foob></foob></foob></foob></foo></em></b><aside><b></b></aside>" + } + }, + { + "data": "<isindex action=\"x\">", + "errors": [], + "fragment": { + "name": "table" + }, + "document": { + "props": { + "tags": { + "form": true, + "hr": true, + "label": true, + "input": true + } + }, + "tree": [ + { + "tag": "form", + "attrs": [ + { + "name": "action", + "value": "x" + } + ], + "children": [ + { + "tag": "hr" + }, + { + "tag": "label", + "children": [ + { + "text": "This is a searchable index. Enter search keywords: " + }, + { + "tag": "input", + "attrs": [ + { + "name": "name", + "value": "isindex" + } + ] + } + ] + }, + { + "tag": "hr" + } + ] + } + ], + "html": "<form action=\"x\"><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form>", + "noQuirksBodyHtml": "<form action=\"x\"><hr><label>This is a searchable index. Enter search keywords: <input name=\"isindex\"></label><hr></form>" + } + }, + { + "data": "<option><XH<optgroup></optgroup>", + "errors": [], + "fragment": { + "name": "select" + }, + "document": { + "props": { + "tags": { + "option": true + } + }, + "tree": [ + { + "tag": "option" + } + ], + "html": "<option></option>", + "noQuirksBodyHtml": "<option><xh<optgroup></xh<optgroup></option>" + } + }, + { + "data": "<svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true, + "div": true, + "plaintext": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "div", + "children": [ + { + "text": "foo" + } + ] + }, + { + "tag": "plaintext", + "children": [ + { + "text": "</foreignObject></svg><div>bar</div>", + "no_escape": true + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div></plaintext></foreignObject></svg></body></html>", + "noQuirksBodyHtml": "<svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div></plaintext></foreignObject></svg>" + } + }, + { + "data": "<svg><foreignObject></foreignObject><title></svg>foo", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "svg svg": true, + "svg foreignObject": true, + "svg title": true + } + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "svg", + "ns": "http://www.w3.org/2000/svg", + "children": [ + { + "tag": "foreignObject", + "ns": "http://www.w3.org/2000/svg" + }, + { + "tag": "title", + "ns": "http://www.w3.org/2000/svg" + } + ] + }, + { + "text": "foo" + } + ] + } + ] + } + ], + "html": "<html><head></head><body><svg><foreignObject></foreignObject><title></title></svg>foo</body></html>", + "noQuirksBodyHtml": "<svg><foreignObject></foreignObject><title></title></svg>foo" + } + }, + { + "data": "</foreignObject><plaintext><div>foo</div>", + "errors": [], + "document": { + "props": { + "tags": { + "html": true, + "head": true, + "body": true, + "plaintext": true + }, + "no_escape": true + }, + "tree": [ + { + "tag": "html", + "children": [ + { + "tag": "head" + }, + { + "tag": "body", + "children": [ + { + "tag": "plaintext", + "children": [ + { + "text": "<div>foo</div>", + "no_escape": true + } + ] + } + ] + } + ] + } + ], + "html": "<html><head></head><body><plaintext><div>foo</div></plaintext></body></html>", + "noQuirksBodyHtml": "<plaintext><div>foo</div></plaintext>" + } + } + ] +} diff --git a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php index 4d914e4680..e7ac940b92 100644 --- a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php +++ b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php @@ -355,9 +355,9 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase { // XML/HTML character entity references // Note: Commented out because they are not marked invalid by the PHP test as // Title::newFromText runs Sanitizer::decodeCharReferencesAndNormalize first. - // array( 'A &eacute; B' ), - // array( 'A &#233; B' ), - // array( 'A &#x00E9; B' ), + // [ 'A &eacute; B' ], + // [ 'A &#233; B' ], + // [ 'A &#x00E9; B' ], // Subject of NS_TALK does not roundtrip to NS_MAIN [ 'Talk:File:Example.svg' ], // Directory navigation diff --git a/tests/phpunit/includes/upload/UploadBaseTest.php b/tests/phpunit/includes/upload/UploadBaseTest.php index 287af29d79..3debe6e198 100644 --- a/tests/phpunit/includes/upload/UploadBaseTest.php +++ b/tests/phpunit/includes/upload/UploadBaseTest.php @@ -52,7 +52,7 @@ class UploadBaseTest extends MediaWikiTestCase { [ 'ValidTitle.jpg', 'ValidTitle.jpg', UploadBase::OK, 'upload valid title' ], /* A title with a slash */ - [ 'A/B.jpg', 'B.jpg', UploadBase::OK, + [ 'A/B.jpg', 'A-B.jpg', UploadBase::OK, 'upload title with slash' ], /* A title with illegal char */ [ 'A:B.jpg', 'A-B.jpg', UploadBase::OK, @@ -396,6 +396,23 @@ class UploadBaseTest extends MediaWikiTestCase { ]; // @codingStandardsIgnoreEnd } + + /** + * @dataProvider provideCheckXMLEncodingMissmatch + */ + public function testCheckXMLEncodingMissmatch( $fileContents, $evil ) { + $filename = $this->getNewTempFile(); + file_put_contents( $filename, $fileContents ); + $this->assertSame( UploadBase::checkXMLEncodingMissmatch( $filename ), $evil ); + } + + public function provideCheckXMLEncodingMissmatch() { + return [ + [ '<?xml version="1.0" encoding="utf-7"?><svg></svg>', true ], + [ '<?xml version="1.0" encoding="utf-8"?><svg></svg>', false ], + [ '<?xml version="1.0" encoding="WINDOWS-1252"?><svg></svg>', false ], + ]; + } } class UploadTestHandler extends UploadBase { diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index 801ab9179b..bd076ba30f 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -212,7 +212,7 @@ class UserTest extends MediaWikiTestCase { * @group medium * @covers User::getEditCount */ - public function testEditCount() { + public function testGetEditCount() { $user = $this->getMutableTestUser()->getUser(); // let the user have a few (3) edits @@ -221,17 +221,15 @@ class UserTest extends MediaWikiTestCase { $page->doEdit( (string)$i, 'test', 0, false, $user ); } - $user->clearInstanceCache(); $this->assertEquals( 3, $user->getEditCount(), 'After three edits, the user edit count should be 3' ); - // increase the edit count and clear the cache + // increase the edit count $user->incEditCount(); - $user->clearInstanceCache(); $this->assertEquals( 4, $user->getEditCount(), @@ -239,6 +237,46 @@ class UserTest extends MediaWikiTestCase { ); } + /** + * Test User::editCount + * @group medium + * @covers User::getEditCount + */ + public function testGetEditCountForAnons() { + $user = User::newFromName( 'Anonymous' ); + + $this->assertNull( + $user->getEditCount(), + 'Edit count starts null for anonymous users.' + ); + + $user->incEditCount(); + + $this->assertNull( + $user->getEditCount(), + 'Edit count remains null for anonymous users despite calls to increase it.' + ); + } + + /** + * Test User::editCount + * @group medium + * @covers User::incEditCount + */ + public function testIncEditCount() { + $user = $this->getMutableTestUser()->getUser(); + $user->incEditCount(); + + $reloadedUser = User::newFromId( $user->getId() ); + $reloadedUser->incEditCount(); + + $this->assertEquals( + 2, + $reloadedUser->getEditCount(), + 'Increasing the edit count after a fresh load leaves the object up to date.' + ); + } + /** * Test changing user options. * @covers User::setOption @@ -451,4 +489,37 @@ class UserTest extends MediaWikiTestCase { $this->assertGreaterThan( $touched, $user->getDBTouched(), "user_touched increased with casOnTouched() #2" ); } + + /** + * @covers User::findUsersByGroup + */ + public function testFindUsersByGroup() { + $users = User::findUsersByGroup( [] ); + $this->assertEquals( 0, iterator_count( $users ) ); + + $users = User::findUsersByGroup( 'foo' ); + $this->assertEquals( 0, iterator_count( $users ) ); + + $user = $this->getMutableTestUser( [ 'foo' ] )->getUser(); + $users = User::findUsersByGroup( 'foo' ); + $this->assertEquals( 1, iterator_count( $users ) ); + $users->rewind(); + $this->assertTrue( $user->equals( $users->current() ) ); + + // arguments have OR relationship + $user2 = $this->getMutableTestUser( [ 'bar' ] )->getUser(); + $users = User::findUsersByGroup( [ 'foo', 'bar' ] ); + $this->assertEquals( 2, iterator_count( $users ) ); + $users->rewind(); + $this->assertTrue( $user->equals( $users->current() ) ); + $users->next(); + $this->assertTrue( $user2->equals( $users->current() ) ); + + // users are not duplicated + $user = $this->getMutableTestUser( [ 'baz', 'boom' ] )->getUser(); + $users = User::findUsersByGroup( [ 'baz', 'boom' ] ); + $this->assertEquals( 1, iterator_count( $users ) ); + $users->rewind(); + $this->assertTrue( $user->equals( $users->current() ) ); + } } diff --git a/tests/phpunit/mocks/media/MockMediaHandlerFactory.php b/tests/phpunit/mocks/media/MockMediaHandlerFactory.php new file mode 100644 index 0000000000..54d46b0271 --- /dev/null +++ b/tests/phpunit/mocks/media/MockMediaHandlerFactory.php @@ -0,0 +1,51 @@ +<?php +/** + * Media-handling base classes and generic functionality. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup Media + */ + +/** + * Replace all media handlers with a mock. We do not need to generate + * actual thumbnails to do parser testing, we only care about receiving + * a ThumbnailImage properly initialized. + * + * @since 1.28 + */ +class MockMediaHandlerFactory extends MediaHandlerFactory { + + private static $overrides = [ + 'image/svg+xml' => MockSvgHandler::class, + 'image/vnd.djvu' => MockDjVuHandler::class, + 'application/ogg' => MockOggHandler::class, + ]; + + public function __construct() { + // override parent + } + + protected function getHandlerClass( $type ) { + if ( isset( self::$overrides[$type] ) ) { + return self::$overrides[$type]; + } + + return MockBitmapHandler::class; + } + +} diff --git a/tests/phpunit/structure/AutoLoaderTest.php b/tests/phpunit/structure/AutoLoaderTest.php index 58de8e8491..f36b51a7e9 100644 --- a/tests/phpunit/structure/AutoLoaderTest.php +++ b/tests/phpunit/structure/AutoLoaderTest.php @@ -143,4 +143,15 @@ class AutoLoaderTest extends MediaWikiTestCase { $this->assertFalse( $uncerealized instanceof __PHP_Incomplete_Class, "unserialize() can load classes case-insensitively." ); } + + function testAutoloadOrder() { + $path = realpath( __DIR__ . '/../../..' ); + $oldAutoload = file_get_contents( $path . '/autoload.php' ); + $generator = new AutoloadGenerator( $path, 'local' ); + $generator->initMediaWikiDefault(); + $newAutoload = $generator->getAutoload( 'maintenance/generateLocalAutoload.php' ); + + $this->assertEquals( $oldAutoload, $newAutoload, 'autoload.php does not match' . + ' output of generateLocalAutoload.php script.' ); + } } diff --git a/tests/phpunit/suites/ExtensionsTestSuite.php b/tests/phpunit/suites/ExtensionsTestSuite.php index 0e23fdde82..02934fa7bd 100644 --- a/tests/phpunit/suites/ExtensionsTestSuite.php +++ b/tests/phpunit/suites/ExtensionsTestSuite.php @@ -8,10 +8,16 @@ class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite { public function __construct() { parent::__construct(); + $paths = []; + // Autodiscover extension unit tests + $registry = ExtensionRegistry::getInstance(); + foreach ( $registry->getAllThings() as $info ) { + $paths[] = dirname( $info['path'] ) . '/tests/phpunit'; + } // Extensions can return a list of files or directories Hooks::run( 'UnitTestsList', [ &$paths ] ); - foreach ( $paths as $path ) { + foreach ( array_unique( $paths ) as $path ) { if ( is_dir( $path ) ) { // If the path is a directory, search for test cases. // @since 1.24 @@ -19,7 +25,7 @@ class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite { $fileIterator = new File_Iterator_Facade(); $matchingFiles = $fileIterator->getFilesAsArray( $path, $suffixes ); $this->addTestFiles( $matchingFiles ); - } else { + } elseif ( file_exists( $path ) ) { // Add a single test case or suite class $this->addTestFile( $path ); } diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index d04e0fcb54..13694063c1 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -837,30 +837,60 @@ class DjVuSupport { * Initialize and detect the tidy support */ class TidySupport { - private $internalTidy; - private $externalTidy; + private $enabled; + private $config; /** * Determine if there is a usable tidy. */ - public function __construct() { - global $wgTidyBin; - - $this->internalTidy = extension_loaded( 'tidy' ) && - class_exists( 'tidy' ) && !wfIsHHVM(); - - $this->externalTidy = is_executable( $wgTidyBin ) || - Installer::locateExecutableInDefaultPaths( [ $wgTidyBin ] ) - !== false; - } - - /** - * Returns true if we should use internal tidy. - * - * @return bool - */ - public function isInternal() { - return $this->internalTidy; + public function __construct( $useConfiguration = false ) { + global $IP, $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig, + $wgTidyConf, $wgTidyOpts; + + $this->enabled = true; + if ( $useConfiguration ) { + if ( $wgTidyConfig !== null ) { + $this->config = $wgTidyConfig; + } elseif ( $wgUseTidy ) { + $this->config = [ + 'tidyConfigFile' => $wgTidyConf, + 'debugComment' => false, + 'tidyBin' => $wgTidyBin, + 'tidyCommandLine' => $wgTidyOpts + ]; + if ( $wgTidyInternal ) { + $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP'; + } else { + $this->config['driver'] = 'RaggettExternal'; + } + } else { + $this->enabled = false; + } + } else { + $this->config = [ + 'tidyConfigFile' => "$IP/includes/tidy/tidy.conf", + 'tidyCommandLine' => '', + ]; + if ( extension_loaded( 'tidy' ) && class_exists( 'tidy' ) ) { + $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP'; + } else { + if ( is_executable( $wgTidyBin ) ) { + $this->config['driver'] = 'RaggettExternal'; + $this->config['tidyBin'] = $wgTidyBin; + } else { + $path = Installer::locateExecutableInDefaultPaths( $wgTidyBin ); + if ( $path !== false ) { + $this->config['driver'] = 'RaggettExternal'; + $this->config['tidyBin'] = $wgTidyBin; + } else { + $this->enabled = false; + } + } + } + } + if ( !$this->enabled ) { + $this->config = [ 'driver' => 'disabled' ]; + } } /** @@ -869,6 +899,10 @@ class TidySupport { * @return bool */ public function isEnabled() { - return $this->internalTidy || $this->externalTidy; + return $this->enabled; + } + + public function getConfig() { + return $this->config; } }